Skip to main content
Participant
May 20, 2020
Question

Fillable Form Drop down box and adding pages

  • May 20, 2020
  • 1 reply
  • 1033 views

I am creating an Adobe Form for the managers to use to create contracts. Basically, on one of the pages, there is an equipment list that they have to select from dropdown lists. At the end of the document, there are pages based on the selection on this list that outline more details on the equipment. What I would like to happen is: They select the equipment from the list, and it auto- adds the page at the end. 

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
May 20, 2020

You need a page template. There are two parts to the process.

1. One the "Organize Pages" panel in Acrobat Pro, select the "Page Template" option on the "More"menu.

2. Use a script to "spawn" the  new page from the template.

 

This topic has been well covered in these forums, Search for "Page Template". 

Here's the reference entry for the "template" object.

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_AcroJS%2FTemplate_methods.htm

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ToadylakeAuthor
Participant
May 21, 2020

Yes I looked into the page templates. I successfully created a button that spawns the page, however, I would like it to activate from the dropdown box. Sorry, I guess I should've been more clear. My question is more about the scripit I need to put into the dropdown box to make it spawn the page. 

 

Thank you. 

Thom Parker
Community Expert
Community Expert
May 21, 2020

You can use either a Keystroke script or Validation script.

Here's an article that explains using the keystroke.

https://acrobatusers.com/tutorials/change_another_field/

 

The technique explained there changes the value of another field. You'd need to change it spawn on a particulure selection. This same technique can also be used in a validation script.

 

If your template names are the same as the choices in the dropdown, then you can use this very simple script:

 

this.getTemplate(event.value).spawn( << spawn parameters >>);

 

If it's not this simple then you'll need to mapping object used in the article.

 

 

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