These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Validate Text Field

mallaman
Registered: Sep 19 2008
Posts: 6
Answered

Good afternoon,
I have 2 Text Field and 1 Submit Button, I would like to know how can I do to see if the two text field are met, and they are doing save as, if not an error message appears...
Thank you for understanding

My Product Information:
Acrobat Pro Extended 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Do you want to validate the text fields on pressing the Submit button, or when the user does a Save?

For the submit, use a JavaScript action to do the submission. Include code that validates the fields and then calls "submitForm" if the validation passes.

For a save, there is an event called "WillSave". You can enter a script into the event from the "Advanced-Document Processing->Document Actions" menu item. A save cannot be blocked. However, the "WillSave" code can display a warning message.Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mallaman
Registered: Sep 19 2008
Posts: 6
I wanted to press the button "save as" the script make sure the "text fild" so satisfied or not ..
I do not understand anything about programming can help me?
Thank you very much

Helder