Copy link to clipboard
Copied
Hello again everyone.
I have the code below which is a button to generate an email and also make a check box visible on a form going out to a customer. I have an employee signature box which flattens the form except for this button and the customer signature fields. The code is in a mouse up javascript within the action tab of the button.
The code works in the fact it generates the email and makes the check box visible when attached to the email message, however no matter where I locate the code to hide the button its still visible when the PDF is opened from the received email. Can anyone suggest how I can make this work as intended please
Copy link to clipboard
Copied
So is it this line that is supposed to hide the button?
this.display = display.hidden;
In the button context, the "this" keyword is the document object. Seems like it aught to be the button object, since that's where the script is placed, but it's not. The button object is available through the event object.
Use this code to hide the button.
event.target.display = display.hidden;
Copy link to clipboard
Copied
So is it this line that is supposed to hide the button?
this.display = display.hidden;
In the button context, the "this" keyword is the document object. Seems like it aught to be the button object, since that's where the script is placed, but it's not. The button object is available through the event object.
Use this code to hide the button.
event.target.display = display.hidden;
Copy link to clipboard
Copied
Perfect Thom,
Thank you very muh
Copy link to clipboard
Copied
The Acrobat JavaScript model, much like Acrobat, is not obvious. Got lots of non-standard quirks.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now