Get value of text field?
Hoping someone can help me...
I have a adobe form with a text input field alongside a checkbox. I want my javascript to basically do the following: check the number inserted by the user into the text field and then spawn template pages (amount equal to that of the number inserted in the text field).
This is the code I have so far however it is not working, can someone tell me what I am doing wrong? (by the way, the code is inserted as a mouse down action on the checkbox). The name of the text field is "buildingsNumber" and the template name is "buildings".
var bAmount = document.getElementById("buildingsNumber").value;
var t = this.getTemplate("buildings");
for (var i = 1; i <= bAmount; i++)
t.spawn(i, true, false, XO);
