• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Fillable Form Drop down box and adding pages

New Here ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

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. 

TOPICS
Acrobat SDK and JavaScript

Views

639

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

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_Acro...

 

 

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2020 May 21, 2020

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2020 May 21, 2020

Copy link to clipboard

Copied

LATEST

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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines