Avatar

Level 10

Hi,

You could set up your validation along the lines:

fld = xfa.resolveNode("form1.p1.textField1.ui.#textEdit.border.fill.color"); // this is for the fill colour

if (test fails)

{
     fld.value = "255,0,0";

     textField1.border.fill.color.value = "255,0,0" // border colour red

}

else

{
     fld.value = "255,255,255";

     textField1.border.fill.color.value = "255,255,255" // border colour black

}

Hope that helps,

Niall