Spawn and delete page field numbering fail
I have a form and on that form I have a custom button to spawn a new page -
var template = this.getTemplate("1");
template.spawn(this.numPages, true, false);
this.pageNum = this.numPages-1;
When I add a few pages everything is works properly, fields are renamed etc. Once I delete a page say page 4 of 5 pages the page deletes fine. Page is deleted via a custom button that is on the spawned page -
var response = app.alert("Are you sure you want to DELETE page" + (this.pageNum+1) + " ?", 2, 2);
if(nResponse == 4) {
this.deletePages(this.pageNum,this.pageNum);
this.pageNum = 0;
}
Now when I spawn a new page after deleting a page it appears to duplicate the last page I spawned. It does not rename the fields so it populates the fields with data from the last spawned page, any ideas?
