Hi Lisa,
In the Javascript above, after the first nullTest line add the following script:
TextField1.border.edge.color.value = "255,0,0";
TextField1.assist.toolTip.value = "This field is mandatory, please provide a response...";
After the second nullTest line add the following script:
TextField1.border.edge.color.value = "255,255,255";
TextField1.assist.toolTip.value = "This field is optional...";
Set the initial tool tip for Textfield1 (in the Accessibility tab) to "This field is optional...".
In addition you may want to add the following Javascript in the exit field of the TextField1 to turn off the red border if the user inputs data:
if (this.rawValue != null) {
this.border.edge.color.value = "255,255,255";
}
if (CheckBox1.rawValue == 1 & this.rawValue == null) {
this.border.edge.color.value = "255,0,0";
}
Regards,
Niall