What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Conditional logic

    Asked by jamielill on February 10, 2016 at 10:57 AM

    Hi All,

    I have two drop down lists list1 and list2

    In one list1 i have the numbers 1, 2 and 3

    The user cannot add anything to this list but can choose a number from the list

    In list2 i have A,B,C and D

    If the user chooses A put 1 in list 1

    B put 2 in list 1

    C put 3 in list 1

    D put 0 in list 1

     

    Zero is not part of the drop down list and conditional logic will leave the list blank.

    If only works if the numbers are in the list.

    Am I missing something here, or is there a way around this

     

    Remember only 3 numbers the user can choose from zero is automatically added to the list

     

    Thanks

    thanks drop down lists 3 all
  • Profile Image
    JotForm Support

    Answered by Mike_G on February 10, 2016 at 12:59 PM

    To my understanding, the numbers 1, 2, 3, and 0, will show or be selected in 'list 1' depending on what letter is chosen in 'list 2', is that correct? However, you only want the numbers 1, 2, and 3 as an option for 'list 1'. 

    Is this what you are aiming to have, https://form.jotform.com/60405197361958?

    You will notice on the 'list 1' drop-down list, you can only select options 1, 2, and 3. 

    It is because I have added this CSS code to hide '0' from the options.

    #input_1 option:nth-child(5) {

    display:none !important;

    }

    However, since I have created a condition that if 'D' is selected in 'list 2' then '0' will appear on 'list 1' as a selected option.

    I would also suggest you clone the form I have used for testing and inspect the conditions in it.