6 Replies Latest reply on May 1, 2014 10:34 AM by PleaseHelpMe

    Multiple Add Page Buttons Question


      I'm working on a form that will have five seperate buttons to open five seperate templates. I've gotten the first set of buttons done and am thinking I may run into a stumbling block.


      When the user clicks Yes, a hidden template opens. When the user clicks No, the page is deleted. The user will not always need to have more than one template but may need say template one and four.


      I currently have my No button set up to delete a specific page number.


      My question is: If the user spawns template one and four and then decides they don't need template four and wants to delete it by clicking No, how would the program know to delete the template that was spawned by button four? Is there a way to say "delete this specifc template name" instead of "delete this page number"?


      My Yes button script says:


      var a = this.getTemplate ("Template"); a.spawn();


      My No button script says:


      var a = this.deletePages

      ({nStart: 1});


      I appreciate the help.