Fillable Form Drop down box and adding pages

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, Create PDFs, How to, PDF forms

Views

225

Likes

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

Fillable Form Drop down box and adding pages

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, Create PDFs, How to, PDF forms

Views

226

Likes

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
May 20, 2020 0
Adobe Community Professional ,
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...

 

 

Likes

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
Reply
Loading...
May 20, 2020 0
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. 

Likes

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
Reply
Loading...
May 21, 2020 0
Adobe Community Professional ,
May 21, 2020

Copy link to clipboard

Copied

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.

 

 

Likes

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
Reply
Loading...
May 21, 2020 0