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

Redisplay a Button

realname
Registered: Aug 15 2008
Posts: 93

I have added a simple javascript to make all 4 of the buttons on my form invisible when the "Submit by Email" button is clicked which works fine. My question: if the user changes their mind and needs to change something on the form, the buttons are all now invisible, how can I make them visible again?
 
My script on the email button on the mouse down event is this:
 
if (this.event__click)
emailbutton.presence = "invisible";
(etc. for the other 3 buttons)
 
Is there a better way to hide them?

My Product Information:
LiveCycle Designer, Windows
pforms
Registered: Nov 17 2009
Posts: 87
If the buttons are hidden after clicking the Submit by Email button, presumably the user would have to start again and then resubmit the form. How about a simple reset button.
realname
Registered: Aug 15 2008
Posts: 93
I already have a reset button which I also hide when the form is being submitted/emailed. Basically I don't want any of the buttons visible to the recipient. The four buttons I have on the form are print, reset, save and email. I was thinking if the user could click somewhere on the form, the buttons could reappear.
DaveyB
Registered: Dec 10 2010
Posts: 70
I was looking for a method for submitting to multiple email addresses at the same time, and found a solution. Then I remembered seeing this question and realized that the same solution might work here!!

Have a look at Stefan Cameron's Forums and look at the two button technique he uses in the example form on that page.Your problem is to hide the buttons for the recipient, which works, but being able to unhide them for the sender without giving the recipient the same ability. The answer is to permanently hide the email button on the form, and use a standard event button to call the hidden button. Now you can script in hiding the buttons before the email event as well as conduct a sanity-check on the fields to make sure the required ones are all filled in, send the email, then unhide the buttons again afterwards (execEvent() returns empty, therefore it will return to the calling process).

Hope that helps you :)

DaveyB

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB