Skip to main content
Known Participant
May 27, 2022
Answered

Acrobat checkbox off to hide a spawned page

  • May 27, 2022
  • 2 replies
  • 842 views

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! 

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer try67

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);

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
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);

Known Participant
May 27, 2022

Thankyou again, perfect!