Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Java Script to add pages to a fillable form.

Community Beginner ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

I am using the script below to add pages to a fillable form it a button is selected. If a certain button is selected it adds 3 pages, all of which have their own script. My issue is when all 3 are added it takes you to the last page. I am looking to have it take you to the next page. For instance, the button to add these additional pages is on page 1, so they will be added as pages 2, 3 and 4, and I want to go immediately to page 2, but currently it takes you to page 4. Any ideas? Thanks in advance.

 

var a =this.getTemplate("Short Form" );

 

a.spawn(2,false, false);

 

this.pageNum++;

TOPICS
How to, JavaScript, PDF forms

Views

647

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 04, 2021 May 04, 2021
Use this.pageNum = 1;

Likes

Translate

Translate
Adobe Community Professional ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

Use

this.pageNum = 1;

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
community guidelines
Community Beginner ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

Worked perfectly. Thanks for your help.

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
community guidelines
Community Beginner ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

I am trying to redevelop a report that generally has more than one page but can also be just one page. 

 

var a =this.getTemplate("Short Form" );

 

a.spawn(2,false, false);

 

this.pageNum++;

 

Short Form above represents what? Let's say I have an Investigations Report which contains most of the who, what, why, when info along with pedrigree information and then there smallish narrative section all on page1. Page 2 is mostly a blank large small for contiuation narrative. I would like staff to be able to click a button that would generate page 2 and then if neccsary click a button on page 2 that would generate page 3 and so on. Also how are Page # of # created. 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
community guidelines
Adobe Community Professional ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

LATEST

"Short Form" is the name of a template page.

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
community guidelines