Skip to main content
maxh7617989
Participating Frequently
May 26, 2023
Answered

Show/hide pages based on check boxes

  • May 26, 2023
  • 2 replies
  • 5120 views

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?

This topic has been closed for replies.
Correct answer Nesa Nurani

It should work in reader but not if it's on mobile device. 

2 replies

maxh7617989
Participating Frequently
May 26, 2023

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. 

Nesa Nurani
Community Expert
May 26, 2023

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-pages/m-p/13121750 

And here is example file that spawn/delete pages: https://drive.google.com/file/d/1mFJfwXYzwr3WXM8sjN4XS8tz4J9k2pPA/view?usp=share_link 

Known Participant
June 2, 2023

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

Known Participant
June 2, 2023

Change "y" to "Yes", or move script to calculate.


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