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.


Add Page Button

New Here ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

I created an "Add Page" button in my form that adds additional blank copies of that page. I used the following javascript:

this.getTemplate("New Page").spawn({nPage:this.numPages, bRename:true, bOverlay: false});

 

The user sometimes has to add up to 10 copies of that page to input different things. But for some reason, whatever she puts in the 3rd added page, will start to reappear in the 6th page and on. 

 

I tried a new code to add pages: 

Var a = this.getTemplate (“New Page”);

a.spawn();

This code works, but it adds the pages out of order. For some reason the most recently added page will appear in the middle of the document.

 

Can someone help me either solve the issue with my first code, to make it stop copying what was written in an earlier page; 

Or, help me with the second code to add pages one after the other, in the correct order?

 

Thanks so much!

 

TOPICS
Create PDFs, Edit and convert PDFs, General troubleshooting, How to, JavaScript, PDF forms

Views

360

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 ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

To add pages use this:

this.getTemplate("New Page").spawn({nPage:this.numPages, bRename:true, bOverlay: false});

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
New Here ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

Hi Bernd,

 

Yes this is the javascript I originally was using but it started copying content onto the next added pages. I am needing each added page to be blank and separate from the others, if that makes sense.

 

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 ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

LATEST

You doesn't use this at the button on the 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