Skip to main content
Participating Frequently
September 28, 2023
Question

How to spawn template page as first page and delete the new second page?

  • September 28, 2023
  • 1 reply
  • 763 views

Hello, I have a form that currently spawns a 2nd page from a template when you check off a box, then deletes the original first page when you press the save button. I want to put a reset button on the top right so you can just start anew without having to reopen the file and it has proven challenging. Javascript I've researched to spawn a page before the current page didn't work,  and spawning it after kind of defeats the purpose as it won't delete itself(page 1) in the same action. 

 

Does anyone know if this is possible and if so, how? 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 29, 2023

To spawn a page as the first page of the file specify the nPage parameter as 0 (and the bOverlay parameter as false).

To delete that page later on use this command:

this.deletePages(0,0);

Participating Frequently
September 29, 2023

Can you use that in the same javascript?