Highlighted

Preserve template when adding page.

New Here ,
Aug 31, 2020

Copy link to clipboard

Copied

I have a document in which I add pages from a template using a button that executes the following script.

var add = this.getTemplate("Pilot Progress");
add.spawn();

 The issue I would like to solve is that if someone fills out the page I have marked as the template, that content will be duplicated on the added page.

 

I would like the user experience to be as simple as possible. I have thought about including a pop up dialouge asking something like "please confirm this page is unfilled prior to adding a page" or including a rest form button in case someone makes an error, but I view these as work arounds. I would like the template page to be the last page of the document and be read only. Then, ideally, when the "Add Page" button is pressed, it adds a page from the template before the last page (the template page) and removes the read only conditions on that newly added page so it can now be filled out.

 

Can anyone suggest a way that I might accomplish this?

 

Thanks!

Adobe Community Professional
Correct answer by BarlaeDC | Adobe Community Professional

HI,

 

As the template object has a hidden property, could you just hide the template until it is needed?

 

Regards

 

Malcolm

TOPICS
Create PDFs, PDF forms

Views

32

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

Preserve template when adding page.

New Here ,
Aug 31, 2020

Copy link to clipboard

Copied

I have a document in which I add pages from a template using a button that executes the following script.

var add = this.getTemplate("Pilot Progress");
add.spawn();

 The issue I would like to solve is that if someone fills out the page I have marked as the template, that content will be duplicated on the added page.

 

I would like the user experience to be as simple as possible. I have thought about including a pop up dialouge asking something like "please confirm this page is unfilled prior to adding a page" or including a rest form button in case someone makes an error, but I view these as work arounds. I would like the template page to be the last page of the document and be read only. Then, ideally, when the "Add Page" button is pressed, it adds a page from the template before the last page (the template page) and removes the read only conditions on that newly added page so it can now be filled out.

 

Can anyone suggest a way that I might accomplish this?

 

Thanks!

Adobe Community Professional
Correct answer by BarlaeDC | Adobe Community Professional

HI,

 

As the template object has a hidden property, could you just hide the template until it is needed?

 

Regards

 

Malcolm

TOPICS
Create PDFs, PDF forms

Views

33

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
Aug 31, 2020 0
Adobe Community Professional ,
Aug 31, 2020

Copy link to clipboard

Copied

HI,

 

As the template object has a hidden property, could you just hide the template until it is needed?

 

Regards

 

Malcolm

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...
Aug 31, 2020 0
New Here ,
Aug 31, 2020

Copy link to clipboard

Copied

Yup, I sure can.

 

Wow do I feel dumb!

 

Thanks so much!

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...
Aug 31, 2020 0