OK, baby steps. If I skip something you don't understand, reference the step number and I'll try to help.
- Add a drop down list.
- Add the items you want in the list.
Now, this is where you have two choices. You can populate the second list based on the selection in the first list, or you can hide/reveal a list based on the first list.I recommend hiding the unused drop down lists. - Add the second drop down list, and add its items.
- In the Object tab, under the field subtab, set presence to invisible.
- repeat steps 3 and 4 for each dropdown list. One for each item in your first drop down list.
- As an optional step, you can create one more drop down list and set it to read-only. This is just a placeholder so users aren't "shocked" when they see a new field come from nowhere.
Now for the coding. - Select your first dropdown list.
- Go to the javascript exit event.
- here's the code you'll use (I used simple names because I'm lazy.)
if (this.rawValue == "BrandA"){
ddlist2.presence = "visible";
ddlist3.presence = "invisible";
}
if (this.rawValue == "BrandB"){
ddlist2.presence = "invisible";
ddlist3.presence = "visible";
}
The code is checking the value of what the user selected in the dropdown box to determine which second drop down list to show. Without a doubt, there are probably many much more clever ways to do this with a shorter process. But, this gives you what you need and should be easy to understand.