How to have dynamic drop down based on selection?

  • houacct
    Asked on November 26, 2017 at 8:53 PM

    hi Team,

        I need some help on dynamic drop down menu with calculation values for email to send.

       for ex.

         dropdown 1 had below value

            vegetables

            fruits

            Dry fruits

        

    Now based on my dropdown values, I need to show values for each options.

       for ex.

    for dropdown 1 Vegetables selection

                            potato

                            onion

    for dropdown 2 fruits selection

                            apple

                            orange

    for dropdown 3 dry fruits selection

                            Almond

                            Cashew


    do not want to use show and hide based on dropdown 1 selection please as I need 10 line and do not want to create 30 drop boxes to show and hide based on selection, it slows down form randomization I have tried it. 



  • Nik_C
    Replied on November 27, 2017 at 5:10 AM

    In that case, maybe a Dynamic dropdown widget would work for you:

    1511777264Screen Shot 2017 11 27 at 11 Screenshot 10

    Where you can set options by nesting them:

    1511777318Screen Shot 2017 11 27 at 11 Screenshot 21

    And here is how it works:

    1511777415screencast Screenshot 32

    Here is my test form: https://form.jotform.com/73301852951960 please check.

    Hope it helps.

    Thank you!

  • houacct
    Replied on December 24, 2017 at 9:47 PM

    hi is it possible to have multiple drop down for 2nd drop down.

    for ex. if I select vegetable. I get 3 drop down instead 1 to select.

  • BJoanna
    Replied on December 25, 2017 at 2:17 AM

    Unfortunately, that is not possible. However, you can nest additional sub-options to the second dropdown that will create additional dropdown field.  

    1514186118drop1 Screenshot 10

    https://form.jotform.com/73581427431961 

  • houacct
    Replied on January 7, 2018 at 9:43 PM

    can I do dynamic selection on Vegetales.

    for ex.

    form https://www.jotform.com/build/80067917185160

    if I select text1 can I have group A selection and on text2 , group B gets selected. do we have any property which I can set ?

  • Nik_C
    Replied on January 8, 2018 at 1:41 AM

    Since you're using regular drop-down field and widget, that is not possible to do with that setup, like in your test form.

    The workaround would be to break the widget in two:

    1515393502Screen Shot 2018 01 08 at 7 Screenshot 10

    And then show them conditionally based on the text selection:

    1515393558Screen Shot 2018 01 08 at 7 Screenshot 21

    You can check how it works here: https://form.jotform.com/80071499751967

    Let us know how that worked for you.

    Thank you!

  • houacct
    Replied on January 21, 2018 at 4:22 PM

    can we use  CSS to select value in drop down 1 and show / hide  values in drop down 2.

  • Adrian
    Replied on January 21, 2018 at 6:23 PM

    You cannot use CSS to select a value in a drop-down and you cannot use CSS to show/hide options in a dropdown based on the selected option of the first drop-down because you don't know which option was selected.

    Let us know if you have further questions.

  • houacct
    Replied on January 21, 2018 at 7:01 PM

    we can keep default values if need to.

  • Nik_C
    Replied on January 22, 2018 at 1:56 AM

    CSS cannot be used in that way, even if you set the default value since CSS is used for styling the element(s) what you want to do has to be done with JavaScript.

    However, in your case, since you want to use widgets dropdowns, I would say that the best solution would be to use regular dropdowns and conditional logic to show/hide them properly.

    1516604160Screen Shot 2018 01 22 at 7 Screenshot 10

    Let us know if that could work.

    Thank you!