Hi There,
I have a script that checks if a subform is visible. If it is visible then a text field becomes required. That part works fine now. When prompting the user I want a custom message to be displayed - something user friendly not a list of field names. The default error message associated with the nullTest property says "vendor1 is required" - that is not good enough.
So I added a line to customize that alert. Now I am getting both alerts on my test. First my custom alert (script below) and then the default alert.
a) Is it possible to prevent the default error message associated with the nullTest property?
or
b) Is it possible to customize the content in the default error message associated with the nullTest?
If none of the above are possible, is there another way to write the code to make a text field required on the visibility condition and output a custom alert?
Current Script:
if (comparativeBids.presence == "visible") {
this.validate.nullTest = "error";
xfa.host.messageBox("Please enter a vendor name on line 1 of the Comparative Analysis section.", "Comparative Analysis Required", 0, 0);
}
else {
this.validate.nullTest = "disabled"
}