Help spawning Template to the following page checkbox is located with visible/hidden properties.

New Here ,
Apr 21, 2020

Copy link to clipboard

Copied

Hi, I am working on a 5 page document that has a checkbox located on page 1 for supplemental information if needed.  When CB is selected, it makes template visible.  How do I add to the code to put it in the next page (page 2) of the document and not go to the end?  Below is the code that is currently in the checkbox.  I have searched multiple support threads and tried varies ways to add npage, but seem to be unsuccessful.  I am not a JS guru by all means.  Any help would be appreciated, thanks in advance!

 

if(event.target.value!="Off")
{this.getTemplate("Extended").hidden=false;}
else
{this.getTemplate("Extended").hidden=true;}

Adobe Community Professional
Correct answer by Bernd Alheit | Adobe Community Professional

Use the method spawn.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, Edit and convert PDFs, How to, PDF forms

Views

338

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

Help spawning Template to the following page checkbox is located with visible/hidden properties.

New Here ,
Apr 21, 2020

Copy link to clipboard

Copied

Hi, I am working on a 5 page document that has a checkbox located on page 1 for supplemental information if needed.  When CB is selected, it makes template visible.  How do I add to the code to put it in the next page (page 2) of the document and not go to the end?  Below is the code that is currently in the checkbox.  I have searched multiple support threads and tried varies ways to add npage, but seem to be unsuccessful.  I am not a JS guru by all means.  Any help would be appreciated, thanks in advance!

 

if(event.target.value!="Off")
{this.getTemplate("Extended").hidden=false;}
else
{this.getTemplate("Extended").hidden=true;}

Adobe Community Professional
Correct answer by Bernd Alheit | Adobe Community Professional

Use the method spawn.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, Edit and convert PDFs, How to, PDF forms

Views

339

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
Apr 21, 2020 0
Adobe Community Professional ,
Apr 21, 2020

Copy link to clipboard

Copied

Use the method spawn.

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...
Apr 21, 2020 1
New Here ,
Apr 21, 2020

Copy link to clipboard

Copied

Thanks, figured it out!

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...
Apr 21, 2020 0
New Here ,
May 13, 2020

Copy link to clipboard

Copied

Can you please tell me how you figured it out?  This is what I'm trying to do but the answer "use the method spawn" is not very helpful. 

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...
May 13, 2020 0
Adobe Community Professional ,
May 13, 2020

Copy link to clipboard

Copied

You should start by learning a bit about writing code. 

www.pdfscripting.com

 

If you search this forum for the words template and spawn. You'll find many posts that provided example code.

 

 

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...
May 13, 2020 0
kgunnz LATEST
New Here ,
May 13, 2020

Copy link to clipboard

Copied

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
Reply
Loading...
May 13, 2020 0