Another Method for Calculation vs Validation Scripts
I just learned something new that is very helpful.
At the beginning of my journey toward expertise in all things Adobe Acrobat and the JavaScript programming language that makes it hum, I answered questions on the Acrobat Users Forum and quickly became a top-ranked participant. The website changed the format and I got very busy with my work, so I stopped answer questions, taking several years off.
I recently started answering again. This keeps me sharp, helps me learn, and gives me fresh ideas for newsletter content.
Get the course above, and a suite of automation tools for FREE with a Professional subscription.
I wrote in Calculation vs Validation Scripts and Calculation vs Validation Scripts II that calculation scripts run every time any field value changes, but validation scripts only run when the value of the field containing the script changes. This is an important distinction because if you want the user to able to change a calculated field value after it has been calculated, it will usually revert to the calculated value. For this reason, calculated fields should usually be set to Read Only, since there’s no point in allowing the user to enter text. Read Only fields are also skipped over when tabbing through fields.
Dropdown fields and List Box fields can contain export values that are different from their displays values. This makes validation scripts tricky for these fields. It’s easier to use a custom Keystroke script with the changeEx event.



