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

How do you create a save button and disable save?

johnnyLikeAdobe
Registered: Oct 28 2008
Posts: 9

Hi, I want to create a save button but disable the main one on the toolbar - forcing the user to use my button which validates a form before saving, denying save in certain cases.

Or, I need them both to allow or disallow saving based on a form field's value. For example, if the name is missing on the form, I do not want the user to be able to save the form.

Everyone will have Adobe Acrobat Pro.

I have tried to find by looking in the javascript manual but cannot figure it out.

Thank you for any help.

My Product Information:
Acrobat Pro 9.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Look at the app.hideMenuItem and app.hideToolbarButton methods.

George
johnnyLikeAdobe
Registered: Oct 28 2008
Posts: 9
how do I get the menu item back? also, please, does this require folder level scripts? but what if I only want it for one document? I only need save disabled for one type of document not everything.

thank you again.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Yes, you'd normally place this in a folder-level JavaScript file. To get the buttons back you'd remove the statement from the file and restart Acrobat. So, doing this for only certain documents is not going to work.

You can set up a document to hide all toolbars and menu items(I hate documents that do that), but the user can easily restore using F8/F9.

I'm afraid you don't have the control you're seeking. Put a big, fat, VALIDATE button on your form, program it to suit your needs, and train your users to use it.

George