Spawn a template, or hide a page?
I am trying to do two things here. Part 1 works, but the spawning piece is off. Help, please, and thank you.
I have created the template and it is hidden.
//enters full name of child when child is 12 or over//
//spawns new page CARITemplate when child is 12 or over//
//otherwise blank//
var child = this.getField("ChildAge").value;
var childFirst = this.getField("ChildFirstName").valueAsString;
var childMiddle = this.getField("ChildMiddleName").valueAsString;
var childLast = this.getField("ChildLastName").valueAsString;
if (child < 12) {event.value = ""};
else {event.value = childFirst + " " + childMiddle + " " + childLast;}
AND this.getTemplate("CARITemplate").spawn(this.numPages, false, false);
