I have a form in which I would like one field ("BillingID") to become visible if the value in an adjacent dropdown box ("Doc_type") equals a certain value, but otherwise to remain invisible. Although the Doc_type drop down text choices are more verbose, I've assigned the values A and B to the choices to simplify codinglater, if that makes a difference. The field BillingID's presence is set to "invisible" when the form is opened.
Below is a copy of the text in the script editor containing the code I've tried, but it has no effect. I've set the form to dynamic PDF and the scripting language to Javascript. This is in Adobe Designer 7. I'm sure that there's something trivial I'm missing, but I've spent the last several hours on this and gotten nowhere. Any help greatly appreciated!
----- form1.#subform[0].Doc_type::change - (JavaScript, client) ----------
If(form1.#subform[0].Doc_type.Value == "B")
{form1.#subform[0].BillingID.presence = "visible"}
Else
{form1.#subform[0].BillingID.presence = "invisible"}