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

hide / show buttons when sending email

nawaha
Registered: Jul 30 2011
Posts: 11

Good Morning
i have a big issue and none as an answer:
I did a form in acrobat and i need to make the buttons "mail, print, and reset" disappear when the user sent the file by email, just for a better looking of the email itself,
when print it's quite simple it's already done in properties "hidden but printable " visible but doesn't print, so i have a text field that appears when it prints and covers the buttons, what i need is the same options when sending the file via email.
i tried different javascript but i'm not able to do it. help help help
tanxs

My Product Information:
Acrobat Pro 10.0, Macintosh
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
When the Mail button is clicked, you'd have to set the visible property to hidden, something like:

// Set the buttons to hidden
getField("print").display = display.hidden;
getField("reset").display = display.hidden;
event.target.display = display.hidden;


That last line hides the button that the script is attached to, presumably the Mail button. This will present a problem though if the operation fails for some reason, as the buttons will then be hidden and won't get displayed unless you provide some means to re-display them if needed.


nawaha
Registered: Jul 30 2011
Posts: 11
Hi George
what ilalready tried is to set the "ok button" wich sends the mail using "mouse up" and "mouse down" "to hide and show field" it doesn't work, what i'm looking for is a way just to be able to send email without showing the buttons in the attachment "maildoc()". It's driving me crazy. i do not need to hide those 3 buttons " email, print, reset" from the original pdf in any case, just in file mailed.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
In your submit button's MouseUp action, add 3 actions:
Show/Hide a field (select the fields you want to hide)
Run a JavaScript (call this.mailDoc())
Show/Hide a field (select the same fields from before)

That's all there is to it...

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com