How do I ...
I am new to using JavaScript in Acrobat Pro XI. I have a series of fields and a total.
For the main part of the total, I used Acrobat's built in sum function.
The total amount is the sum of field1, field2, field3, and optional_field.
optional_field is a checkbox and I want to assign it with the value of 5. If people check it, 5 is added to the total amount. If it is unchecked, its value is zero and nothing is added.
I have assigned a mouse up event to the checkbox to run the following JavaScript. When I check the checkbox, the total is not affected. What is wrong with my approach?
getField("Sub").value = event.target.value !== "Off" ? 5 : 0;
Richard Steinberg