Cognito-forms – Three dropdown lists for voting – a team can only be selected once

cognito-forms

I have a list (dropdown) of 50 teams. People can vote for their preferred top team. I now need to add the same dropdown, where they can select their second choice. And then I need to add the same dropdown again, where they can select their third choice.

Is there a way that people can't select the same team in the three dropdown lists?

Or is there an other way?

Best Answer

I'm a developer with Cognito Forms.

You can set up a custom error message on your second and third Choice field that will check to see if their value or selected Choice option is the same, and if so an error is displayed.

I set up an example of this using three Choice fields labeled 'First Choice Field', 'Second Choice Field' and 'Third Choice Field'. I then used the following calculation in the custom error message.

=(FirstChoiceField = SecondChoiceField or FirstChoiceField = ThirdChoiceField)

This calculation checks the First Choice Field against the Second Choice Field to see if they are the same. It also checks the First Choice Field and the Third Choice field to see if they are the same. If they are then the error message that has been set up is displayed.