There's a tutorial on saptechnical that contains this piece of code. I can't find any info in the docs about code like this, and the code suggestion doesn't work.
I come from a Java background, so things like this scare me.
This apparently gets the value of all the PRICE
fields on the current page and sums them up.
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var total = 0;
for (var i = 0; i <= fields.length-1; i++) {
if (fields.item(i).name == "PRICE") {
total = total + fields.item(i).rawValue;
}
}
this.rawValue = total;
So how to find info about the complete API? (because for instance I don't know how to do this except with this "magic" piece of code.)
Is there more documentation than this? http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
And why doesn't the code suggestion thingy work? (Oh, i'm also not that much of a Javascript dev).