JavaScript to Hide Button in Acrobat
I'm trying to create a fillable form for users in my organization that use both Acrobat (9 & DC) and Reader (DC). The form is a template that is filled out by users in our organization and then needs to be locked for editing if it is ever distributed outside of the company.
I'm trying to set up a button that locks all the form fields AND disappears after it is clicked (so users outside our organization do not see it). I have the script for the locking finished/working, but I'm having trouble making the button disappear.
I've set up the following script on the click:
event.target.display = display.hidden;
This seems to make the button disappear for the users with Reader, but not with Acrobat.
I've also used:
this.getField("Button1").display = display.hidden;
and I have the same problem.
Any ideas on what I can do differently? I am not a heavy Java user, so I'm not well versed in this code...
