Use conditional logic with dropdown

  • Profile Image
    DHH
    Asked on April 04, 2017 at 10:35 AM

    Can I add a dropdown choice question that then changes the next dropdown options ?

     

    I.E.  If I had a dropdown question that was say Breakfast/Lunch/Dinner, can I have the next question automatically change depending on the answer ? So if the customer chooses breakfast the next question would automatically populate with the choices of eggs/bacon/sausage or if they choose lunch the next question changes to have the choices of sandwiches/salads/soups or if they choose dinner the next question would automatically populate the chooses of steak/chicken/ribs etc etc ?

     

    Many thanks,


    Dale Hart

  • Profile Image
    Sven
    Answered on April 04, 2017 at 12:23 PM

    This can be done using Conditional Logic, you can create a condition that would show/hide dropdown based on specific dropdown selection. 

    I have created this demo form, you can review/clone it using this URL:

    https://form.jotformpro.com/70933979438978

     

    For more information on how to use conditional logic, refer to this guide:

    Smart Forms Using Conditional Logic

    For more information on how to clone an existing form, refer to this guide:

    How to Clone an Existing Form from a URL

     

    Thank you.

  • Profile Image
    DHH
    Answered on April 04, 2017 at 12:44 PM

    Brilliant!! Thank you so much.
    ...
  • Profile Image
    DHH
    Answered on April 04, 2017 at 03:44 PM

    Can I ask for a bit more advice please ?
    How can I add a question to allow for multiple versions of the same choices ?
    I.E. If the user wants to order spare parts, I know how to allow them to complete a form of questions for that one part but can I have a question to ask for how many parts they require and then that number of additional choices will appear ?
    So for one part it's...
    Part number
    Size
    Colour
    And for when they choose three from a dropdown I'd need this to appear...
    Part number
    Size
    Colour
    Part number
    Size
    Colour
    Part number
    Size
    Colour
    Many thanks,
    Dale
    ...
  • Profile Image
    BDAVID
    Answered on April 04, 2017 at 07:21 PM

    What is the form you are working on? You could use the configurable list widget, in which the user can add as many items as he wants to: https://www.jotform.com/help/252-How-to-Add-a-Widget-to-your-Form 

    Let us know if you need more help.

  • Profile Image
    DHH
    Answered on April 05, 2017 at 07:44 AM
    My form is this one https://form.jotformeu.com/70924166537360
    Where I have Product type I’d like the customer to be able to choose how may parts they require and then that number of the two drop downs appear. Is that possible ?
    I’ve looked at the configurable widgets and can’t see anything obvious.
    Many thanks,
    Dale
    ...
  • Profile Image
    candy
    Answered on April 05, 2017 at 10:11 AM

    Hello Dale,

    I've cloned your form on my side in order to test it.

    As my colleague David has already suggested, Configurable List widget seems to be helpful to your purpose as you can see the screenshot below:

    Please check this following form: https://form.jotform.com/70943745223962

    Please tell us if I misunderstand your purpose and if this is not you've meant, please give us further detailed information related to your problem.

    Thanks in advance.

  • Profile Image
    DHH
    Answered on April 05, 2017 at 12:45 PM
    Thanks for trying that. It's nearly right.
    If you notice from my form, when you choose something from the first drop down, it changes the choices in the second. Can that be added to yours ?
    Many thanks,
    Dale
    ...
  • Profile Image
    BDAVID
    Answered on April 05, 2017 at 02:20 PM

    That would not be possible with the Configurable List widget. You could have a Configurable List widget per each option, and show it based on users answers: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    Example: https://form.jotformpro.com/70946013888970 

    Let us know if you need more help.

  • Profile Image
    DHH
    Answered on April 06, 2017 at 06:44 AM
    That’s perfect !! Many thanks !!
    ...
  • Profile Image
    DHH
    Answered on April 08, 2017 at 05:44 AM
    Hi again,
    My form is this one https://eu.jotform.com/build/70924166537360
    I’ve had to alter this idea a little now as the list of parts will run into the hundreds. So I’ve had to use the ‘Auto Complete’ widget and its called ‘Name of Part’ on my form.
    My issue now though is two fold…
    1. How can I allow the customer to order different quantities of a part from that field. e.g. using a number scroller ?
    2. How can the customer order more than one part ? e.g. a plus (+) button to give another ’Name of Part' ?
    Your help is really appreciated.
    Kind regards,
    Dale
    ...
  • Profile Image
    Welvin
    Answered on April 08, 2017 at 10:06 AM

    Unfortunately, you cannot have a number selector in the Auto Complete widget. A workaround would be to add a dropdown field as your quantity selector.

    You also cannot dynamically duplicate the auto complete widget. You have to add a predefined number of this widget and show it based on conditional logic. 

    The widget should work for you if you want to allow adding an unlimited number of dropdown options. I would suggest keeping it that way.