callback="plusone_vote"

Form Validation

Posted in: - Mar 29, 2012 2 Comments

Here is another example for form validation. We are using a function to loop through all of the form objects and to take appropriate action if a mandatory field is not completed.

While this version of the example is targeting Acrobat/Reader version 8.1, it also uses the propagate event, which is not actually available in Acrobat/Reader version 8. In practice, if you were targeting the form to version 8.1, then you would remove the propagated exit event and the form will work as intended. The only different is that the error highlighting will remain until the user clicks submit again. The reason I have left the propagated exit event in place is that if you are targeting a higher version of Acrobat/Reader, then you can take advantage of this script.

Download: Assure Dynamics Form validation (Acrobat version 8.1 and below)

2 Responses to “Form Validation”

  1. Reply Mike Irmiter says:

    Thanks for this sample. I am using the script in a form that I put together. It is just what I was looking for. I had to go into the xml to get the propogated exit event to work, but once I found that, it works like a charm.

    • Reply NiallODonovan says:

      Hi Mike,

      I am glad the solution worked for you. In relation to propagation of events, this is a great feature that was in, was out and thankfully is back in LiveCycle Designer ES3 (aka ADEP Designer 10).

      If you have the latest version of Designer there is a checkbox on the right hand side of the Script Editor where you can set the propagation of an event. However this checkbox is not visible by default. In order to see the checkbox you need to go into the Tools > Options dialog and in the Workspace tab you can tick a checkbox to “Display Event Propagation Option”.

      Good luck,

      Niall

Leave a Reply