I have a pdf form. I have a combo box named "CB1" which has below items as a drop down
Four Wheeler (Non AC)
Four Wheeler (AC)
Public Transport / Auto
I want that when some one selects these above items from the combo box a field "Rate" should be automatically populated by value
So for e.g if someone selects Two Wheeler as a option, the Rate field should be automatically 5 and so on. I tried the below custom calculation script in the "Rate" field but it is not working. Can anyone help. I have made sure that Commit Immediately option is selected in the Combo Box field.
My script is as below....
var selectedTYPE = this.getField("CB1").value;
if (selectedTYPE=="Two Wheeler") event.value = "5";
else if (selectedTYPE=="Four Wheeler(Non AC)") event.value = "7";
else if (selectedTYPE=="Four Wheeler(AC)") event.value = "9";
else if (selectedTYPE=="Public Transport / Auto") event.value = "On Actual";
else event.value = "";