Avatar

Level 10

Hi,

Having the submit button give the page number as well as the field that has failed validation is getting increasingly complex to script. If all of your users have Acrobat/Reader v9.1, then you could use the new validateState event and the new validation handling features of LC Designer ES2.

Here is an example of email submit for Acrobat/Reader v9.1: https://acrobat.com/#d=W72hKORXoOt0CAeKEJUuqQ

If you or your users are likely to be using Acrobat/Reader v9.0 or below, then here is a similar example: https://acrobat.com/#d=M3oe*KTVPuco6zeZoMg6Vg. It still has functionality, but has more script to achieve it.

You should also have a look at John Brinkman's blog which has some excellent examples of validation scripting: http://blogs.adobe.com/formfeed/2008/11/validation_patterns_part_3.html

The execValidation script will check all fields that are mandatory, even those set to mandatory by the checkboxes. Here is an example for changing the mandatory property using a dropdown: https://acrobat.com/#d=dQgzjM1hQAz6dX3vtlS87w.

I hope that helps,

Niall