I have two drop down fields, the select in the first drop down field provides the list of items in the second drop down list. When an item in the second drop down list is selected, I want a hidden field to become visible.
I'm not sure how to write the script on the second drop down list to make the field visible. Here's the script I have, that's not working:
if (this.rawValue == "ACD"); { agentID.presence = "visible"; } if (this.rawValue == "Agent"); {
agentID.presence = "hidden"; }
Thanks,
M.Dawn
Hi Margaret,
Which event have you used for the script? I would recommend the exit event of the second dropdown.
The script looks okay, but just make sure that the second dropdown has .rawValues of "ACD" and "Agent".
Also check the relative reference from the second dropdown to the agentID object. This may be full enough if they are separated by subforms.
Make sure the form is saved as a Dynamic XML Form in the save-as dialog.
Lastly, are there any errors in the JavaScript Console (Control+J when previewing), which would indicate a problem when interacting with the second dropdown?
Niall
Good luck,
Niall
https://acrobat.com/#d=1Kf-jXFMQIDYkIJCl5CEEA
I got the steps this time that you mentioned.
Margaret Dawn
Hi Margaret,
Here is the corrected form https://acrobat.com/#d=D3yZytcriTw0pMp4S232Wg.
You had semi colons after the if statement (which was throwing it). Also I shortened the reference to the agentID object:
if (this.rawValue == "ACD") {
agentID.presence = "visible";
}
else if (this.rawValue == "Agents") {
agentID.presence = "hidden";
}
Good luck,
Niall
North America
Europe, Middle East and Africa
Asia Pacific