Skip to main content
Known Participant
May 27, 2022 9:53 AM UTC
Answered

Acrobat checkbox off to hide a spawned page

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.
try67
try67Correct answer
Community Expert
May 27, 2022 10:02 AM UTC

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 10:02 AM UTC

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

Translate
Known Participant
May 27, 2022 10:25 AM UTC

Thankyou again, perfect! 

Translate