These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

highlight required fields at runtime vs "Highlight Fields"

Boon
Registered: May 5 2010
Posts: 66

Hello,

I have written a script function that will highlight objects that are required field but blank. I put this function in the Click event of a Submit button. The script will highlight the objects in yellow. This way, a user will see which object/field he/she needs to complete before submit.

The problem I have is that when I open the form in Preview, it has a built-in button on the top right edge of the form viewing area. (I believe this is the same when I open the form in Acrobat.) When I turn on "Highlight fields", all the input fields are highlighted in blue and for the required fields, there will be a red border. Now, when I click my submit button, I won't see the yellow hightlight as I programmed in my script. I need to turn off the "highlight fields" first in order to see the yellow highlight.

I think this is not intuitive for users.

Is there a way to do this better? What I want to heppen is that a user does not have to turn off the "Highlight Fields" in order to see the yellow hightlight.

thanks,
Boon

jonom
Registered: Jan 31 2008
Posts: 133
You can use the following to turn off the field highlight:
if (app.runtimeHighlight){app.runtimeHighlight = false;}