Skip to main content
robind48179731
Participant
Jul 25, 2024 7:21 PM UTC
Question

Need a button to trigger a hidden page to show

I have a PDF with a page that collects 'building information,' and the user needs to be able to repeat that page up to 10 times to add additional buildings. I don't just want 10 pages of the same fields in case someone only needs to fill out one building page.

 

I'd like a button to 'add additional buildings' that will open one more building page to fill out (etc. etc. until they've reached 10, if desired).

 

Is there a way to hide duplicate pages, and have a button trigger those hidden pages to show up to be completed?

 

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Thom Parker
Community Expert
Community Expert
Jul 25, 2024 7:41 PM UTC

Adding new pages is implemented with a Page Template, which is spawned to create new pages. 

Unfortunately there isn't a lot of good documentation on this topic. But Page templates are created with a menu item in the "Organize Pages" toolset. Then JavaScript is used to create the new pages. This functionality only works in viewers that implement the Acrobat JavaScript model.

 

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often