I'm trying to create a page where users can select cast their vote for certain items in the order they choose.
There are a dynamic amount of options to choose from, e.g. there might be three options to choose from [apples, bananas, oranges], and therefore each option has a select against it, with each select then having three order of preference values [1,2,3].
The results set could be something like:
[apples,2],[bananas,3],[oranges,1]
And I'll eventually manipulate this so that I have [oranges,apples,bananas]
in a array.
How do I validate that all options have been chosen, and that they can be seen to be in order?
Do I need to pass the data thru a loop that orders them by the chosen preference, and then counts to see if there is a missing preference?
Or am I missing a wonderful plugin that already does this?