4 Replies Latest reply on Aug 7, 2014 8:43 AM by jajawheels

    Remove spawned template/new page

    jajawheels Level 1



      Thanks in advanced for taking the time to assist me.


      I have a single-paged .pdf document. On this page is a field with an action which uses javascript to spawn a template. This field has a couple of options, so based on the value of the field, the appropriate template becomes the second page of the document. Currently, each time the field is selected and the action is triggered, a new page is added to the end of the document (page 3, 4, 5, etc.). This is not the ideal situation. I created a second button called Remove Form, which I intend to use to remove the previously created page 2 so that the templates just replace each other on page 2 of the document.


      Now, I'm aware that the template does become a page once it is spawned and that the this.deletePages() method is available. However, how do I use such a method as an action in the button layout below?


      Thank you!