I am spawning a page and need to have a simple calculation script (sum of multiple fields) in a "Total" field. This is what I have so far:
var amount = "P" + (this.numPages - 1) + ".templatename.fieldparentname";
var sum = 0;
for (var i=0; i < 27; i++) { var total = amount +"." + i; sum += Number(this.getField(total).value); } event.value = sum;
It works on the template without the precursory "P" + (this.numPages - 1) + ".templatename., but will not work on the spawned page.
The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.