making a selection

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
hi all,

I have this simple problem:
A user has to choose his 3 favorite numbers from a list of 100 numbers. I
want to show these numbers with some sort of checkbox. How can I create a
groep of checkboxes that are somehow linked in a way the user can only
select maximum 3 numbers?

I hope someone can help me out


Re: making a selection

Quoted text here. Click to load it

Might be possible in Javascript, with server-side validation in case
JS is disabled.

Possibly better, certainly more reliable, would be to have three
columns of radio buttons.

One     A1( )   B1( )   C1( )
Two     A2( )   B2( )   C2( )
Hundred A100( ) B100( ) C100( )

Doesn't stop people picking the same number twice or three times if
they really like it, though, but it would mean they could only make
one choice per column.


Re: making a selection

Quoted text here. Click to load it

Even with simple problems, posting the URL is recommendable. It often
helps to suggest an approach that completely avoids the problem.

Quoted text here. Click to load it

That's quite a many numbers to choose from, isn't it? The natural idea is
to include three text input fields and ask the user to type the numbers.
That should normally as convenient as or more convenient than scrolling
down and trying to find the numbers. But this really depends on what is
being selected. Is it really about numbers, or are the numbers just used
to identify some items?

Quoted text here. Click to load it

You cannot, in HTML. And you don't need to. Just tell the user that he is
expected to select at most three, and make the form handler (server-side)
reject submissions that violate this. You could do that politely, or non-
politely, or silently, depending on your goals.

Yucca, /
Pages about Web authoring:

Site Timeline