Need Custom Text In Dropdown to equal zero
In short, I want to assign a value of zero to a dropdown field if the user does not choose an item from the list and enters custom text.
I have a form with multiple fields. The form calculates the Wheel Tax based on input from three fields. "Wheel Tax Cities" and "Wheel Tax Counties" are both dropdowns that have items with Export Values and allow user to enter custom text. A third field is called "License Plate Fee Dropdown." One of the fields called "Wheel Tax" I have a custom calculation script that sort of works but only calculated sporadically:
var t1 = getField("Wheel Tax Cities").value;
var t2 = getField("Wheel Tax Counties").value;
var PlateTransfer = getField("License Plate Fee Dropdown").value;
if (PlateTransfer < 1) event.value = 0;
else if (isNaN(t1)) t1 = 0;
else if (isNaN(t2)) t2 = 0;
else event.value = t1+t2;
Wheel Tax = Wheel Tax Cities + Wheel Tax Counties but is zero when there is a PlateTransfer.
Thanks for your time, and one last thing, is there a good reference book to buy to help me learn Acrobat Javascript? Thanks!!
