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

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

1.5K

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

Community Expert , May 04, 2021 May 04, 2021

Use

this.pageNum = 1;

Votes

Translate

Translate
Community Expert ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

Use

this.pageNum = 1;

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

Copy link to clipboard

Copied

Worked perfectly. Thanks for your help.

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

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 ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

LATEST

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

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