Ranked preference in an HTML form?
October 31, 2007 9:02 AM
Subscribe
Is there a way to rank choices or preferences for a question in a HTML form?
I'm trying to build a HTML form that will allow a user to rank their responses. For example, if I ask what their favorite color is:
A. Red
B. Blue
C. Green
D. Yellow
... I would like to know that their order of preference is C, A, D, then B.
Any ideas? I've been searching, but I'm either coming up blank or searching for the wrong combination of words.
posted by jmevius to computers & internet (12 comments total)
2 users marked this as a favorite
One possible solution:
Create the form with N dropdown boxes, where N is the number of items to choose from, in this case N = 4.
Initially, all but the first drop down is invisible. The user puts their first choice in the first box. When you detect that it has changed, you remove that choice from each of the remaining N-1 boxes and make the second box visible. Rinse and repeat.
posted by jeffamaphone at 9:13 AM on October 31, 2007