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.isPropertySpecified("fill")) {
this.ui.oneOfChild.border.nodes.remove(this.ui.oneOfChild.border.fill);
}
}
You could also try having separate fields for the portion of the default text that can change and then using floating fields display the values in a paragraph, depending on the amount of text and the number of them that could be easier for the form filler.
Regards
Bruce