My problem is that I can get 1 fresh form to spawn but it is out of order. I need it to be after the add form button, page 2. I also need to be able to spawn multiple forms and they spawn in sequential order with the appropriate page number showing in the header. I've looked all over different forums and every way to do this hasn't worked. the JavaScript code is posted below. I'd appreciate any help, thank you.
var t1 = getTemplate("Template1");
if (numPages == 1) {
t1.spawn({nPage: numPages, bRename: true, bOverlay: false});
} else {
}