Skip to main content
Participant
October 21, 2016
Question

Set limit to a page spawn script

  • October 21, 2016
  • 1 reply
  • 423 views

Hi everyone, I'm using a simple script with a button to spawn a new page from a hidden template; however, is there a way to limit the number of times that page is spawned? I need to limit it to only one time / one page spawn per button. I'm a rookie here, so my current script for the page spawn button is pretty basic:

Header 1
var a = this.getTemplate ("PARS3"); a.spawn();

Thank you for the help!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 25, 2016

Create a (hidden) text field with the value zero. When the button is clicked check its value. If it's zero spawn the page and change the value to "1". If the value is not zero, don't spawn the page.