Answered
I am creating a PDF form for mailing specifications. I have created a drop-down list (Combo box field) of choices for who owns the mailing indicia (Company A, Company B, Company C, or Other). I want a text field to automatically fill in depending on what choice the user makes from the drop-down field.
For example, if the user chooses "Company A" in the drop down list, a corresponding text field should then show the number "1234," but if "Other" is chosen, the text field remains blank and editable so the user can enter their own number. I have a feeling this will require some javascript, but I don't know javascript.
Any help would be greatly appreciated!
Remember that the double forward slashes are used to make comments. Commented lines are not executed when the code is run so you can copy and paste them along with actual executable code if you want.
//Put this code in a custom calculation script of the text field you want to choice made in the combo box to appear.
var myCbox = getField("NAME OF COMBOBOX FIELD"); //Insert the name of the combo box between the "".
if(myCbox.value == "Other")
{
this.event.value = "";
}
else
{
this.event.value = myCbox.value;
}
You might want to make sure that each item in the combo box list has an export value for example the item called "Other" should have an export item of "Other".
StevenD