• Resolved somethingelse3

    (@somethingelse3)


    I’d like to have a drop down who’s options of choices are conditional of another drop down.

    For example, if I have three drop down menus: 1) State 2) County 3) City. Depending on the state they choose in first drop down menu, the form will automatically bring in the county’s of that state. Then they’ll select a county, and the city drop down menu will populate with cities within that county. I’d like it set up like this.
    …………………………..
    Select a State
    [drop down menu]

    Select a County
    [drop down menu]

    Select a City
    [drop down menu]

    …………………………….

    Suggestions on how to construct?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    you will need to construct a dropdown list with all the different states first. then per state you need a seperate group, each one containing a drop down list with all the different counties and an additional nested group for each of the counties within the state, and then, per county group add a dropdown list with all the possible cities.

    it’s gonna get quit complex and have a lot of nested groups going on, but if you are a bit handy with a find and replace text editor using regex (notepad++ or editpad pro) you can easily generate the form code from an excel file.

    here’s a small example to get you on your way:

    [select state "state1" "state2"]
    [group state1]
      [select state1county "state1county1" "state1county2"]
      [group state1county1]
        [select state1county1city "state1county1city1" "state1county1city2"]
      [/group]
      [group state1county2]
        [select state1county2city "state2county2city1" "state1county2city2"]
      [/group]
    [/group]
    [group state2]
      [select state2county "state2county1" "state2county2"]
      [group state2county1]
        [select state2county1city "state1county1city1" "state2county1city2"]
      [/group]
      [group state2county2]
        [select state2county2city "state2county1city1" "state2county2city1"]
      [/group]
    [/group]

    i figure the conditions would be self explanatory, but here are a couple to get you on your way

    if [state] equals "state1" then show [state1]
    if [state1county] equals "state1county1" then show [state1county1]
    if [state1county1city] equals "state1county1city1" then show [state1county1city1]
    
    Thread Starter somethingelse3

    (@somethingelse3)

    thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditional Drop Down’ is closed to new replies.