Letting user select from multiple options in a specific order?

L

Leif K-Brooks

I want to let users select options from a list in a form. A <select
multiple="multiple"> would be fine, but the user needs to be able to
select the order to put them in as well. Any suggestions?
 
S

Sid Ismail

: I want to let users select options from a list in a form. A <select
: multiple="multiple"> would be fine, but the user needs to be able to
: select the order to put them in as well. Any suggestions?


You won't get the order.

Have the listed repeated three times, use radio buttons, and sub-headings
"First Choice", "Second... "

Sid
 
L

Leif K-Brooks

Sid said:
: I want to let users select options from a list in a form. A <select
: multiple="multiple"> would be fine, but the user needs to be able to
: select the order to put them in as well. Any suggestions?


You won't get the order.

Have the listed repeated three times, use radio buttons, and sub-headings
"First Choice", "Second... "

The number of choices will be up to the user, though. There has to be
some way...
 
C

Chris Morris

Leif K-Brooks said:
The number of choices will be up to the user, though. There has to be
some way...

They can't choose more than the number of options, so repeat the
options n times, including 'no choice' in each one.

For n small, use radio buttons as they're nicer.

For n large, use <select> as it doesn't take up over a page per choice
selection.

You probably want to submit this to an intermediate piece of code that
checks that their list is consistent - i.e. if the options are
A,B,C,D,E they have something like

ABCDE or DEA..

and not

ABAA. or A...D or .ABCD

and lets them re-adjust it if they can.

It's not an ideal solution, but I've had few complaints about that
part of it when I had to solve a similar problem (it was an online
voting system with preferences).
 
J

Jukka K. Korpela

Leif K-Brooks said:
The number of choices will be up to the user, though. There has to be
some way...

Given the way HTML forms are defined - something _very_ trivial in essence,
though with confusing variation in minor details - your optimism is
admirable. :)

But you can define a set of items where each choice appears as plain text,
preceded (or followed) by a text input field, where the user can type in the
ordinal number of the choice. It will be up to the form handler, of course,
to check that the choices are consistent, and to process them in the desired
way.
 
S

Sid Ismail

: They can't choose more than the number of options, so repeat the
: options n times, including 'no choice' in each one.
:
: For n small, use radio buttons as they're nicer.
:
: For n large, use <select> as it doesn't take up over a page per choice
: selection.


The radio buttons ensure that only one is clicked. :))
He will, in addition, need a script to check whether an item is clicked
twice in the different selections...

Sid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top