Copy link to clipboard
Copied
I would like to create a fillable form that will show pages if certain checkboxes are selected. Initially, the pages would be hidden but checking boxes would reveal them. Is this possible in Adobe Acrobat Pro?
Copy link to clipboard
Copied
Yes, by turning pages into a template, you can spawn them when needed and delete pages instead of 'hiding' them.
There are a lot of posts on this forum with examples, here is an example how to make template and sample script to spawn them: https://community.adobe.com/t5/acrobat-discussions/indesign-drop-down-menu-choice-changes-hides-page...
And here is example file that spawn/delete pages: https://drive.google.com/file/d/1mFJfwXYzwr3WXM8sjN4XS8tz4J9k2pPA/view?usp=share_link
Copy link to clipboard
Copied
It should work in reader but not if it's on mobile device.
Copy link to clipboard
Copied
Yes, by turning pages into a template, you can spawn them when needed and delete pages instead of 'hiding' them.
There are a lot of posts on this forum with examples, here is an example how to make template and sample script to spawn them: https://community.adobe.com/t5/acrobat-discussions/indesign-drop-down-menu-choice-changes-hides-page...
And here is example file that spawn/delete pages: https://drive.google.com/file/d/1mFJfwXYzwr3WXM8sjN4XS8tz4J9k2pPA/view?usp=share_link
Copy link to clipboard
Copied
I just attempted to use the document in Adobe Reader and it does not function. Do you know if there is there a way to maintain the template-page-spawning functionality within Reader? Solving this problem for my business will only make sense if the resulting document can be used on-site.
Copy link to clipboard
Copied
It should work in reader but not if it's on mobile device.
Copy link to clipboard
Copied
Ahh right ok thank you.
Copy link to clipboard
Copied
Hello Nesa,
(Apologies if i have not posted correctly)
Im looking at using the code you have provided here, but im getting stuck a little.
I have a 2 page document, but I only wish the second page to show if the the drop down for additional notes is set to yes. If set to no (default) id like the page to remain hidden.
Second page is named page2 and the drop down selcion is No (export n) or Yes (export y)
I have added this to the validation script
if(event.value == "y")
this.getTemplate("page2").spawn(this.numPages, false, false);
but cannot get the page to show even if selected Yes
Copy link to clipboard
Copied
Change "y" to "Yes", or move script to calculate.
Copy link to clipboard
Copied
Thank you that worked, but is there a way to hide it again if No is selected ?
Selecting No, does not hide the page, and selecting Yes again, adds another copy
I have looked at your template test file but that just swaps pages around and doesnt actually remove the page if no additonal pages are required
Copy link to clipboard
Copied
I have played with your code from the test tempate and have managed to get it to work using the following.
var p2 = this.getTemplate("Page2");
var p = Number(this.numPages)-1;
if(this.numPages != 1)
this.deletePages(1,p);
if (event.value == "Yes")
p2.spawn(numPages, false,false);
Copy link to clipboard
Copied
Amazing! Thank you so much! That looks pretty straightforward.
Would you be able to help me out with the validation script for a Checkbox? Also for Radio Buttons?
I am creating a building inspection form to collect relevant material spec information and would like to have the option of spawning the next room if needed (checkbox) and additional room sections (radio buttons) if needed.