I have a PDF form that has some required fields. On the submit button property - action tab - I am using the trigger 'Mouse UP', and it has the 'Submit a form' action (to send the eMail).
If the user tries try to submit the form without some of the required fields, it gives an error and highlights all the required fields.
All that works great by itself.
HOWEVER, I have recently added a 'Run a JavaScript' action - that executes after the 'submit a form' action. This new javascript checks one of the fields entered and directs the user to a new page depending on what they selected.
And that by itself works great (thanks to help from thomp).
MY PROBLEM is that now that I have added the javascript - if the user tries to submit the form with any MISSING required fields, then the form gives you the error message, highlights the missing fields, BUT THEN proceeds to process the javascript and it takes the user to a webpage depending on what they did (or did not) enter in the field the script was checking.
IS THERE ANY WAY that I can check first to make sure that the form has been SUCCESSFULLY submitted (ie: All required fields have been entered, and the PDF creates the eMail to send the form results out), before I start executing the next action (ie: my javascript to take them to another page)?
Any help will be greatly appreciated!
SunnyOz
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script