What is wrong with my form?
I posted about this form a couple of weeks ago, and am still having trouble trying to figure out where my console errors are coming from.
It seems that most of my errors are stemming from three doc-level functions that I use often and in many different forms. I have never received error messages from these functions before. The functions are:
function no_zero() {
if (+event.value) {
//$ format for nonzero values
AFNumber_Format(2,0,3,0,"$",true);
} else {
//Don't show anything if result is zero
event.value = "";
}
}
function percent_zero() {
if (+event.value) {
//$ format for nonzero values
AFNumber_Format(2,0,0,0,"%",false);
} else {
//Don't show anything if result is zero
event.value = "";
}
}
function round(value, decimals) {
return Number(Math.round(value + "e" + decimals) + "e-" + decimals);
}
I have checked and rechecked and there are no spelling issues when calling these functions through my form-fields. Yet I am still receiving error messages saying the functions are not defined. What's odd is I only receive the messages when I attempt to use any of the automation tools provided with Acrobat (i.e. Add Header or Footer, Watermark, Background, etc.).
Another point that I believe must be related:
Whenever I open this file, all of my calculated fields that should be suppressing values of zero, are displaying zeroes. See below screen grab (the "Sales Tax" line is the only line item that should be displaying a value of 0).

As soon as I change any value on the form, the zeroes disappear.
Thinking that maybe something in this form became corrupt, I rebuilt the entire thing last week. Much to my dismay it is still behaving strangely.
Thanks in advance for your time!
