Skip to main content
Participant
March 7, 2023
Question

Creating a Form

  • March 7, 2023
  • 2 replies
  • 743 views

I am creating a Form and have a radio button that if they click on it I am wanting it to add some pages that they have to certify items. How do I get those hidden pages to populate in a form only when a radio button is clicked?

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
March 7, 2023

The only way to add new pages to a PDF at runtime is with a Page Template. You'll find many posts on this topic. Here's a search link (not all posts are useful, you'll need to look thru them):

https://community.adobe.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&filter=location&location=forum-board:acrobat&q=Page%20Template

 

Page templates are created from the "Organize Pages" tool bar. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Nesa Nurani
Community Expert
Community Expert
March 7, 2023

If you created templates, you can spawn them by using  this as 'Mouse Up' action of radio button you wish to spawn template (just change template name to your actual template name):

var t1 = getTemplate("template name");
if (event.target.value != "Off"){
t1.spawn({nPage: numPages, bRename: false, bOverlay: false});}