How to have dynamic drop down based on selection?

  • Profile Image
    houacct
    Asked on November 26, 2017 at 08: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. 



  • Profile Image
    Nik_C
    Answered on November 27, 2017 at 05:10 AM

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

    1511777264Screen Shot 2017-11-27 at 11.1

    Where you can set options by nesting them:

    1511777318Screen Shot 2017-11-27 at 11.1

    And here is how it works:

    1511777415screencast.gif

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

    Hope it helps.

    Thank you!

  • Profile Image
    houacct
    Answered on December 24, 2017 at 09: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.

  • Profile Image
    BJoanna
    Answered on December 25, 2017 at 02: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.JPG

    https://form.jotform.com/73581427431961 

  • Profile Image
    houacct
    Answered on January 07, 2018 at 09: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 ?

  • Profile Image
    Nik_C
    Answered on January 08, 2018 at 01: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.36

    And then show them conditionally based on the text selection:

    1515393558Screen Shot 2018-01-08 at 7.37

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

    Let us know how that worked for you.

    Thank you!

  • Profile Image
    houacct
    Answered on January 21, 2018 at 04:22 PM

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

  • Profile Image
    Adrian
    Answered on January 21, 2018 at 06: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.

  • Profile Image
    houacct
    Answered on January 21, 2018 at 07:01 PM

    we can keep default values if need to.

  • Profile Image
    Nik_C
    Answered on January 22, 2018 at 01: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.51

    Let us know if that could work.

    Thank you!