Skip to main content
stevenj65950687
Participant
May 23, 2017
Question

Anyway to have a drop down list show certain items depending on what the user selects via a radio button?

  • May 23, 2017
  • 1 reply
  • 260 views

So, I have a form that has a radio button with the two Options "Domestic" and "International" is there a way to make a drop down list of  "Location Codes" only show certain items when someone selects "Domestic" or "International"

I have no experience with Java script.

Please respond.

Thank you!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 23, 2017

The most basic way of doing it is with a custom validation script for the first drop-down, with this code:

if (event.value=="Domestic") this.getField("Location Codes").setItems(["1", "2", "3", "4"]);

else if (event.value=="International") this.getField("Location Codes").setItems(["5", "6", "7", "8"]);

else this.getField("Location Codes").clearItems();