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

Java Script to add pages to a fillable form.

Community Beginner ,
May 04, 2021 May 04, 2021

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
2.0K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
May 04, 2021 May 04, 2021

Use

this.pageNum = 1;

View solution in original post

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

Use

this.pageNum = 1;

Translate
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

Worked perfectly. Thanks for your help.

Translate
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

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. 

Translate
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
LATEST

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

Translate
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