Set value of a textbox if a dropdown value has certain value
Using Acrobat Pro, I have a dropdown field called Program. User will select from three options
- Choose One (this is default to prompt user to select something)
- SNAP
- TANF
I then have Textbox field that is called programLong. I want this field to auto update to the long names for each or be blank if option 1 is not changed.
Here is my code that will only update the programLong filed if I preview and then click Edit. It will not update when the dropdown field changes values.
var progValue = this.getField("Program").value;
if (progValue == "SNAP") {
event.value = "Supplemental Nutrition Assistance Program (SNAP)";
}
else if (progValue == "TANF"){
event.value = "Temporary Assistance for Needy Families (TANF)";
}
else if (progValue == "Choose One"){
event.value ="";
}

