Acrobat Pro field properties calculations DISAPPEARING / Javascript NOT SAVING
Dear Adobe Community,
I made a form with calculations under text field properties.
(They are all basic algebra )
1 is a custom calculation script, and the other 2 are simplified field notations (basic addition)
The calculation scripts are simply not always saving. If I make a new PDF off the old one - and save it w/a new name - while most field properties remain - the calculation scripts do not always save. Sometimes they do, sometimes they dont.
Even more bizzare - I have the PDF open now. The calculations are there. I close it (w/o saving), reopen it - and 1 of the calculatins is gone. Then i do the same thing, this time A DIFFERENT calculations is gone.
Really pulling my hair out.
Please help...thank you!
Here are the calculations:
(function () {
// Get the values of the text fields, as numbers
var v1 = +getField("FillText13").value;
var v2 = +getField("FillText14").value;
// Set this field's value based on the state of the check box named "CB"
if (getField("FillText16").value !== "Off") {
event.value = v1 - v2;
} else {
event.value = v1;
}
})();
(function () {
var sStart = getField("FillText40").valueAsString;
var sEnd = getField("FillText46").valueAsString;
var dStart, dEnd, diff;
if(sStart && sEnd) {
dStart = util.scand("m/d/yy", sStart);
dEnd = util.scand("m/d/yy", sEnd);
diff = dEnd.getTime() - dStart.getTime();
event.value = Math.floor(diff / 864e5) / 30;
} else {
event.value = "";
}
})();
FillText16 + FillText17 + FillText25 + FillText26 + FillText33
FillText27 * .10 / 12 * xy
