So, Adobe 8 Professional allows you to set the value of the check box when it is checked but not when it is unchecked.
My situation is I have three fields and a check box, where the three fields are numbers that are manually input to the form and I would like the check box to add 3 to the total of the three fields if it is checked, otherwise leave the total alone if it's unchecked.
I've set the checked value to three and it works as I want it to, adding 3 to the total of the three fields, but when it is left unchecked the field where the total should be displayed displays "NaN" instead.
How do I set the unchecked value of the check box?
Here is the code I'm working with as of right now:
(function () {
var a = +getField("Number 1").value;
var b = +getField("Number 2").value;
var c = +getField("Number 3").value;
var d = +getField("CHK BOX_1").value;
event.value = (a + b + c) + d;
})();
(function () {
var a = +getField("Number 1").value;
var b = +getField("Number 2").value;
var c = +getField("Number 3").value;
var d = +getField("CHK BOX_1").value;
if (d == "Off") d = 0; // if not checked set value to zero
var e = +getField("TOTAL ARMOR CHECK PENALTY").value;
event.value = (a + b + c + d)-e;
})();
George Kaiser