Answered
I have 3 numerical fields in my Acrobat form that calculate miles travelled times the mileage allowance and put the product in a third field. They are named: MileageAllowance, NoMilesR1, and MileageAmtR1.
Currently I have this calculating on the Calculation tab like this:
var f = this.getField("MileageAllowance");
var g = this.getField("NoMilesR1");
event.value = f.value * g.value;
I have learned in this forum some reasons why validation scripts might help remove some errors I am having with this form, so I am trying to change the calculations to the Validation tab. How would I write this script and where would I put it, etc.?
You'd then use the following as the custom validation script of both input fields:
calcTravelCost();
The function code could be streamlined a bit, but I wanted it to be clear.
George