I have a form developped in designer with several required fields.
I need to make shure that all required field are entered before saving the filled form. I notice that the button provided by designder to send an email, it validated that all the fields are entered and if any one is empty, it is marked in red. I noticed that there are not javascripts in that button.
I need that functionality in the save button that I included in the form.
How can I do that? validate all required fields before saving the form.
form1.execValidate();
Where "form1" is the top subform. This does not stop the document from printing. It just displays the validation message if there is an error. So what you need to do is create a custom print button with your own JavaScript on it. The "execValidate()" function returns true or false depending on the result of the validation test.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script