Re: Validating Radio Buttons in two directions
| From: | Austin Denyer | Date: | Tue, 17 Jan 2006 15:53:14 +0000 |
| Subject: | Re: Validating Radio Buttons in two directions | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228715@lists.php.net to get a copy of this message | ||
On Tue, 17 Jan 2006 10:45:01 -0500
John Nichel <john@kegworks.com> wrote:
>
> Huh? Maybe I'm just not awake this morning and not understanding
> what you're trying to explain, but if you're using *radio* buttons,
> only *one* of the same name can be checked at any give time. ie:
>
> <input type="radio" name="color" value="1" /> Blue
> <input type="radio" name="color" value="2" /> Red
> <input type="radio" name="color" value="3" /> Black
> <input type="radio" name="color" value="4" /> Green
> <input type="radio" name="color" value="5" /> Mauve
>
> If you click "Red" and "Blue" is already selected, "Blue" will
> automatically be unselected. It's basic HTML.
That's not what he's trying to do. Grab some coffee #;-D
If I understand correctly, he wants a grid of radio buttons. Each
color can be ranked 1 through 10.
So,
In the range of radio buttons for Blue, you can pick 1-10.
In the range of radio buttons for Red, you can pick 1-10.
In the range of radio buttons for Black, you can pick 1-10.
Etc.
He wants something that prevents someone from selecting, say, 2 for Red
if they have already selected 2 for Blue.
It would be easy to validate this after submission and return to the
page if the user screwed up, but for on-the-fly idiot-proofing he's
gonna need JavaScript.
Regards,
Ozz.
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]