Acrobat field script not calculating properly
I have a form with a number of fields set to use a custom calculation script. That script is below:
var ro = true;
var plan = Number(this.getField("Option1").value);
if (plan==100)
event.value = "Included";
else if (plan==125)
event.value = "Included";
else if (plan==150)
event.value = "Included";
else if (plan==200)
event.value = "Included";
else {
event.value = "";
ro = false;
}
event.target.readonly = ro;
So based on this the field in question is supposed to take a look at the field named "Option1" and if one of four (4) predetermined values are present ($100, $125, $150 or $200) the field should display "$0" and the field is set as read only.
If none of those four (4) predetermined values are present then the field should unlock to allow for manual data entry.
Everything works fine except that when I tab out of the field it deletes any data I've manually entered.
I am perplexed. Can anyone give any guidance here?
Thanks!
