Limit number of times a button spawns a document -Javacript
I am working on an inventory list that is 2 pages. The second page I want to be optional so I decided to use JavaScript (for spawning). I applied this script to my button and it does work. My issue is I only want it to spawn the document once. At this time the button spawns the same document multiple times.
var expTplt = getTemplate("P0Inventorylist");
expTplt.spawn(numPages,false,false);
I only want the user to be able to pull this one time if additional lines are needed. What is the coding I would add to the one above that will limit the user to only pulling this one time?
