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

Acrobat checkbox off to hide a spawned page

New Here ,
May 27, 2022 May 27, 2022

Copy link to clipboard

Copied

Sorry for the continued questions, I'm hoping this will the last one

 

I curently have a checkbox set up to spawn a template using the below, so when you click it, it spawns a template after a specified page

 

this.getTemplate("Section1").spawn(this.getField("Marker1").page+1, true, false);

 

I want it to remove this page though when you uncheck the box, is that doable?

 

Thanks for any help! 

TOPICS
Acrobat SDK and JavaScript

Views

379

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

Sure. Try this:

 

if (event.target.value!="Off")

this.getTemplate("Section1").spawn(this.getField("Marker1").page+1, true, false);

else this.deletePages(this.getField("Marker1").page+1, this.getField("Marker1").page+1);

Votes

Translate

Translate
Community Expert ,
May 27, 2022 May 27, 2022

Copy link to clipboard

Copied

Sure. Try this:

 

if (event.target.value!="Off")

this.getTemplate("Section1").spawn(this.getField("Marker1").page+1, true, false);

else this.deletePages(this.getField("Marker1").page+1, this.getField("Marker1").page+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
New Here ,
May 27, 2022 May 27, 2022

Copy link to clipboard

Copied

LATEST

Thankyou again, perfect! 

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