Iterating Dropdown's Which Dynamically Exclude Previous Selections

Hi

We would like some help/guidance in identifying the best/correct way in approaching the following form

We have a sports league and would like to collect the results of our players, and to make it simple to use we would like to select the number of players who had taken part in the weekly game then select their name from a dropdown list.

There could be anywhere between 3 players up to 50 players

To prevent a player from been selected more than once, would it be possible to iterate the displaying of each dropdown to exclude all the previously selected players from the dropdown in focus?

So the concept would be along the lines of:

#1 Dropdown -> list all players -> (player_6 Selected)

#2 Dropdown -> list all players != player_6 -> (player_25 Selected)

#3 Dropdown -> list all players != player_6 || player_25 -> (player_4 Selected)

Hope this all makes sense

Any help or suggestions on the best way to approach this form would be most appreciated

Many thanks

GPM

Hi,

I have one approach. I dont know whether good or bad

Imagine player 1 to 10

1st dropdown display all (selected player5)

2nd dropdown display which are unselected from dropdown1 (excluded player5 and selected player3)

3rd dropdown display which are unselected from dropdown2 (player1,2,4,6,7,8,9,10 and select player 9)

4th dropdown display which are unselected from dropdown3 (player 1,2,4,6,7,8,10)

Is it helpful ?

You would populate the first dropdown list by selecting the participants of the event from the database. The participants for the event must be known at this point; otherwise, the dropdown list would contain all members of the league.

If you already know the participants; why ask for the count?

You could use ajax to populate the dropdown lists for the second and third place entries, using the participant list and excluding players previously selected. This approach would force the user to select the winners in order, first to third. When there are over ten participants, reducing the dropdown list by two members does not noticibly benefit the user.

If the goal is to avoid duplicates being selected, why not just use a form validation script (http://www.w3schools.com/JS/js_form_validation.asp)? You probably need one anyway to check that all fields are entered.