I'm using Acrobat 8.1.2 on a mac. I've created a form that has a submit button and 2 required text fields. They are both set to "required" so they have to be filled out to submit the form. But the problem is if I fill in only 1 of the two required fields and hit submit, they both come up with the red highlight on them indicating that they have not been filled in yet. Yet, if I then fill in the 2nd text field, it works fine. How can I get Acrobat to not highlight ALL of the text fields if only one of them is not filled in?
app.runtimeHighlight = false;
for(var i=0;i<this.numFields;i++)
{
var cFld = this.getNthFieldName(i);
var oFld = this.getField(cFld);
if(oFld.required && oFld.value == "")
oFld.fillColor = color.red;
else
oFld.fillColor = color.transparent;
}
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script