Hi, Try this code in the layout.ready event
form1.#subform[0].TextField1::ready:layout - (JavaScript, client) var
som = this.somExpression.replace(/\[[0-9]*\]$/, "").
replace(/\[[0-9]*\]\./g, "."). replace(/xfa\.form/, "$template").
replace(/#subform\./, ""); var f = xfa.resolveNode(som); if (this.isNull
|| f.value.text.value == this.rawValue) { // is field empty or the
default value this.ui.oneOfChild.border.fill.color.value =
"255,255,153"; } else { if
(this.ui.oneOfChild.border.isPropertySpec...