Can i have multiple drop downs not allow duplicate answers

  • zugfrig78
    Asked on March 13, 2016 at 1:02 AM

    hi.. if i have say 20 drop down boxes, with the say choices/options available (but with different titles) is there a way to not allow the same choice not to bemade in more than one drop down

     

    eg once a choice is made, that "answer" cant be used in another dropdown

  • Ashwin JotForm Support
    Replied on March 13, 2016 at 3:01 AM

    Hello zugfrig78,

    There is no automated or built in feature to achieve this but you can always add condition in your form to achieve your requirement. Please check the following demo form I created for your and see if this is what you want to achieve:  https://form.jotform.com/60714336532956 

    Feel free to clone this form for a closer look. The following guide should help you in form cloning:  http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Hope this helps.

    Do get back to us if you meant to ask something else.

    Thank you!

     

  • zugfrig78
    Replied on March 13, 2016 at 3:13 AM

    ahh hah! 

     

    Brilliant just what i want,... thanks

     

     

    ok next problem... can i get my 22 boxes to lay out in this exact order (note picture is big scroll across as last row is longer than the rest

     

    Can i have multiple drop downs not allow duplicate answers Image 1 Screenshot 20

  • Ashwin JotForm Support
    Replied on March 13, 2016 at 3:36 AM

    Hello zugfrig78,

    As we cannot answer multiple questions in one thread, I have moved your latest question to a new thread and you will be answered here:  http://www.jotform.com/answers/793511 

    Thank you!

  • zugfrig78
    Replied on March 13, 2016 at 4:55 AM

    hi last question, can you show me how to add the condition now that i have the 22 boxes layed out as i want them

     

  • Nik_C
    Replied on March 13, 2016 at 7:14 AM

    Please try following:

    1. Set calculation values for the drop down field. That means that every row selected must have some value for calculation.

    Note: It is very important to make first row empty. That means that when drop down has default value(empty state). It will not be used in calculations.

    Can i have multiple drop downs not allow duplicate answers Image 1 Screenshot 90

    2. The next thing we have to do is to add Form calculation widget to the form for each drop down field.

     

    Can i have multiple drop downs not allow duplicate answers Image 2 Screenshot 101

    Note: Make sure that when in Calculation wizard you selected option that the field returns text.

     

    3. You switch from return type by clicking on the operand in calculation, in your case drop down field.

    Can i have multiple drop downs not allow duplicate answers Image 3 Screenshot 112

    4. If you did everything properly the value from drop down should be inserted in the Calculation form widget.

    Can i have multiple drop downs not allow duplicate answers Image 4 Screenshot 123

    5. We will hide the Calculation form widgets because we don't want it to show up anywhere in the form.

    Can i have multiple drop downs not allow duplicate answers Image 5 Screenshot 134

    6. Next, we add the error text that the user will see when dropdown values are the same.

    Can i have multiple drop downs not allow duplicate answers Image 6 Screenshot 145

    7. After everything is set up you need to add the conditions. To get to conditions you click Conditions in Form Builder. 

    Can i have multiple drop downs not allow duplicate answers Image 7 Screenshot 156

    8. You have to add the following conditions. These conditions make the error message show up and submit button hide in the following conditions:

    Drop down field 1 is equal to drop down field 2, drop down field 2 is equal to drop down field 3

    There should be a third condition that will check if drop down field 1 is equal to the drop down field 3 so all the posibilities be covered.

    Can i have multiple drop downs not allow duplicate answers Image 8 Screenshot 167

     

    You have to create Calculation form widget for every drop down field you have. Also you should cover every possibility for all the fields in your form for this to work properly.

    Please let me know if this is clear to you.

  • zugfrig78
    Replied on March 13, 2016 at 7:49 AM

    HI

     

    I THINK I WAS OK UNTIL THE LAST PART ABOUT CONDITIONS

     

    IM NOT QUOTE SURE ABOUT HOW TO DO THAT, AND IF BECAUSE I HAVE 45 POSSIBLE ANSWERS IF I HAVE TO DO IT FOR ALL.

     

     

    ALSO AS YOU CAN SEE IN MY FORM CALLED "YOVI BAY TEAM SHEET V2" DOING ALL THIS HAS NOW ALTERED MY LAYOUT OR 3 COLUMNS WIDE AS PER THE FIRST PICTURE IN THIS THREAD

     

  • Nik_C
    Replied on March 13, 2016 at 8:59 AM

    You will have to create conditions that will check state of each drop-down. Meaning you just need to write conditions that will cover each state selected in drop down. For example:

    If you have three drop-downs: 1, 2 and 3. You have to compare state of 1st & 2nd, 1st & 3rd and 2nd & 3rd.

    Now, if really need to check the states like that, it will be a lot of conditions. I'm not sure what is that you are trying to accomplish, maybe you could do this with check-boxes, and just check if check-boxes selected are not the same.

    If you can tell us more about the purpose of your form so we can try to find possible workaround?

    We'll wait for your response.

    Regarding the second question, if I understood you right, you're referring to this problem: http://www.jotform.com/answers/793511, my colleague moved that question to new thread.

    So, please check his answer in that thread. 

     

     

     

     

  • zugfrig78
    Replied on March 13, 2016 at 9:20 AM

    Ok, in a nutshell I play a fantasy football game with 9 friends (so 10 of us in total)

     

    each team ram has a squad of 45 players

     

    each week a use must select a total of 45 players in the 22 available field positions (the 22 drop down boxes represented the field layout and player possitions

     

    the remainder of the 45 simply don't get selected

     

     

    the obvious requirement is they no player can be selected to play in two different positions 

     

     

     

     

  • Kevin Support Team Lead
    Replied on March 13, 2016 at 9:59 AM

    As explained by my colleagues, seems like you will need to add a lot of conditions, each one for each case, comparing the selection made on each drop down. 

    As far as I know there is not a widget to accomplish this, the easiest way would be getting the source code and add your own Javascript code, this guide will hep you to get the source code of your form: http://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form