Creating order forms with editable field - calculated total price field is 1 action behind...
Hi I have been making an order form, acrobat dc on a windows 10 machine.
I have a custom calculation script that is as follows:
var nop18 = Number(this.getField("nop18").valueAsString);
var nokg18= Number(this.getField("nokg18").valueAsString);
var pw18= Number(this.getField("pw18").valueAsString);
var p18= Number(this.getField("p18").valueAsString);
if (nop18>=1) {
event.value = nop18*pw18*p18;
} else if (nop18<1 && nokg18>=1) {
event.value=nokg18*p18;
} else event.value = 0;
The order form is for ordering by piece or by kilo although some line totals are derived from simple product calculations where items are only sold by piece or by kilo.
When filling in the form, only possible on certain browsers (if anyone could give me an answer for firefox/safari i'd be grateful), the total price (which is a simple sum of the individual line prices) is one step behind. It means that I have to do something further, like add in a zero somewhere else to bring the total up to date.
So for example - an empty form still shows a total price but if i chuck in a zero somewhere/anywhere it settles itself. Some of the fields are formatted for being number, some are not, some fields are validated by minimum (eg can't order under 5) and some are not. These are things that could matter but I am clueless as to why.
Does anyone have any idea please? I really needed this project finished yesterday. Thank you in advance.
