Copy link to clipboard
Copied
Good afternoon everyone,
I am fairly new to Adobe, therefore I apologize for a potentially silly question.
I created a form in which I used the following JavaScript to essentially add/remove additional pages based on whether one of the various check boxs are selected or not:
if(event.target.value!="Off")
{this.getTemplate("t1" ).hidden=false;}
else
{this.getTemplate("t1" ).hidden=true;}
My form works perfectfully fine when utilizing Adobe Acrobat Pro 2017; however, when opened in Adobe Reader (where the individuals receiving this form will be opening it) the form does not respond to the JavaScript function. I receieve the following error:
"NotAllowedError: Security settings prevent access to this property or method.
Template.hidden:2:Field Risk 1:Mouse Up".
I have done some reading some the error, but the error seems to be somewhat universal and could be a result of many different issues.
Any thoughts on how to avoid this issue?
Many thanks!
1 Correct answer
Acrobat Reader can't hide or show template pages. Acrobat Reader can spawn and delete template pages.
Copy link to clipboard
Copied
Acrobat Reader can't hide or show template pages. Acrobat Reader can spawn and delete template pages.
Copy link to clipboard
Copied
Thank you, Bernd Alheit.
Do you happen to know the JavaScript code that would enable me to make these changes?
Copy link to clipboard
Copied
Look at the documentation in the Acrobat Javascript Reference.
Copy link to clipboard
Copied
Use the spawn method of the Template object.
Copy link to clipboard
Copied
try67, you give more incorrect information than any other contributor on the Adobe forums. That code will be limited to desktop Reader and won't work on any mobile devices.
Copy link to clipboard
Copied
Feel free to ignore my posts, then.
However, no one mentioned anything in this thread about a mobile device.
Copy link to clipboard
Copied
I am mentioning it. Readers should know that Adobe no longer supports mobile devides with Pro or Reader.
The code you are telling forum readers to implement only works in very specific instanes of PDFs on very specific deivices and version of the Adobe software.
Copy link to clipboard
Copied
It's fine you're mentioning it but don't denigrate me while doing so. I never claimed this code will work on a mobile device as that was not the theme of this thread. In fact, since the OP mentioned an error message in the Console it was clear they were not using the mobile version of the app, since that would not appear there at all.
Copy link to clipboard
Copied
There is a seperate forum for Acrobat Reader on mobile devices.

