Skip to main content
Known Participant
May 27, 2022
Resuelto

Acrobat checkbox off to hide a spawned page

  • May 27, 2022
  • 2 respuestas
  • 851 visualizaciones

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! 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de 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 respuestas

try67
Community Expert
try67Community ExpertRespuesta
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!