JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
Is it possible in a dropdown field to eliminate option when it is used in another dropdown?Asked by psdarmin on September 21, 2015 at 04:11 PM
Is it possible that when you use dropdowns for a quiz, when you already have used that option in one dropdown, that you eliminate it from th other dropdowns?
Technically that's possible using show/hide condition but it would require a lot of conditions as you add more dropdown fields.
Or, you can also try this widget if you want http://widgets.jotform.com/widget/dynamic_dropdowns. Using this widget, you can define child dropdowns to show depending on the selected option on the parent dropdown but you also have to define the options on each of the child dropdowns so there's a workload involve.
Hope this helps!
As my colleague has stated, if your quiz form has several dropdowns (like dozens or even hundreds) you may find yourself having to do a lot of work if implementing this in the form builder. In such cases, embedding the form's full source into a webpage and adding a script to the same page may be a better route to take.
Here's a webpage employing such a solution. The script at the bottom is designed to accommodate any number of dropdowns. Moreover, the dropdowns need not be identical as there are in the demo. All the script is concerned with is that no two selected answers be the same, unless they're the default (blank) option. If there are no intervening dropdowns between the quiz's questions, this more robust version of the script can be used, as illustrated in this other demo.
If you need assistance with this method, we'd be happy to provide it.
Please test this shortened version of the previous demos that contains an edited version of a script I found online. As you'll see, instead of triggering a message whenever an already selected option is chosen, the option is removed (which is what you actually wanted to occur). I made the first six options in each dropdown visible, only so that you could see the updating happening in real time. Just like the previous demos, it will work for any number of dropdowns and it doesn't matter if they all have the same options or same number of options.
Do inform us if you run into any issues while applying this workaround, assuming you use this method.
Enjoy your weekend.