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

Pre-save "Check Form"

ddcoffee
Registered: Jul 25 2007
Posts: 14

In all the forums, I still have not come across a solution to having required fields validated when using a "Save" button. Is there a way to have a "Check Form" element that would handle this, then if all fields "pass" to show the "Save" button? I am using LiveCycle Designer 8.0 and any detailed help would be greatly appreciated.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Doing a save button is problematic. There are two ways to do it.

1) Execute the Acrobat "Save" menu item.

In Acrobat 8 there is a white list of menu items that can be executed from a document. "Save" is not on the default list that installs with Acrobat. While the user can change the white list on their own system to include any menu item, you can't put anything in a document to change it.

2) In Acrobat JavaScript you can save a file with the "doc.saveAs()" function. Unfortunately this function, like the save menu item, cannot be run from a script in a document.

Basically, there isn't any general purpose way to create a SaveButton. To do it, the user has to change their system.

You can do validation on the Pre-Save event, but you cannot stop the save from happening. About the best you can do is warn the user, and maybe highlight the fields.

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

ddcoffee
Registered: Jul 25 2007
Posts: 14
Thanks for your reply, Thom. I was able to finally tweak my form for perform validation on both buttons (Emailto: and SaveAs:) and perform a timestamp (read only) upon the save and submit. After 3 weeks, success. :)