Copy link to clipboard
Copied
I have created a form with checkboxes that when selected spawn a page at the end of the form and removes the page if unchecked. The script works great for me when I am using it in Acrobat Pro but when sent to the user, the script won't function in Adobe Reader. Here is a sample of the script I have for each check box:
if(event.target.value!="Off")
{this.getTemplate("Template Name" ).hidden=false;}
else
{this.getTemplate("Template Name" ).hidden=true;}
Is there anything I can change or re-work to get the pages to spawn and delete as needed for the user? I am a complete novice at this.
Copy link to clipboard
Copied
Your script doesn't spawn or delete pages.
Acrobat Reader can't show or hide pages.
Copy link to clipboard
Copied
Thank you so much! I was able to amend this to what I needed and it worked perfectly.
Copy link to clipboard
Copied
Your script doesn't spawn or delete pages.
Acrobat Reader can't show or hide pages.
Copy link to clipboard
Copied
Use spawn method instead, something like this:
var t1 = this.getTemplate("Template Name");
if (event.target.value != "Off"){
t1.spawn({nPage: numPages, bRename: false, bOverlay: false});}
Also, you can't hide template, you need to delete page using this.deletePages(), keep track of where you spawn template and delete that page.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you so much! I was able to amend this to what I needed and it worked perfectly.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more