Every field entry, including non-calculated fields, causes a recalculation
I am creating a 2-page fillable form. The 2nd page has calculations on each line. All except Machine Cost are using the product (x) of two fields. For Machine Cost, I have the below in the Custom calculation script:
var nResult=0;
var nA = 0;
var nB = 0;
//Acquire inputs
var nA = Number(this.getField("ListPrice1").valueAsString);
var nB = Number(this.getField("Discount1").valueAsString);
//Test if discount is 0 and perform calculation
if (nB == 0){
nResult = nA;
} else {
nResult = nA - (nA * (nB/100));
}
//Assign Result to Field
event.value = nResult;
Every time I enter anything into any field on the form, it is forcing a recalculation. There is a lag/delay and it looks like a calculator icon.
How can I prevent this from happening?
I am using Adobe Acrobat Pro Version 2023.008.20458
