limiting choices with checkboxes

liunx

Guest
Hi :)<br />
<br />
I understand that I need to use radio buttons when only one selection is wanted for an answer. I would like to have the days of the week and offer my visitors either the choice of one or two days that they can pick from the seven. How do I do this?<br />
<br />
Thanks for any help! :)<!--content-->You could use checkboxes instead of radio buttons, as this will alow users to automatically choose mutiple selection.<br />
<br />
You will still need eg JavaScript to check that noone marks more then 2 boxes, but it seems simpler to code then using radiobuttons.<br />
<br />
If you have access to serverside methods you could also do the form validation serverside and thus not have to rely on clientside scripting at all.<!--content-->Or you could make the radio buttons names different. When all their names are the same eg:<br />
<br />
<input type="radio" name="radioset"><br />
<input type="radio" name="radioset"><br />
<input type="radio" name="radioset"><br />
<input type="radio" name="radioset"><br />
<br />
The visitor will only be able to select one.<br />
<br />
<br />
If the names are different:<br />
<br />
<input type="radio" name="radio1"><br />
<input type="radio" name="radio2"><br />
<input type="radio" name="radio3"><br />
<input type="radio" name="radio4"><br />
<br />
The visitor will be able to select more than one.<!--content-->I didn't know that about the radio buttons so that's great to know. I ended up finding a little script at 3am this morning(by Dr Joe no less) that let me do what I was wanting to do. Thanks so much for the help/advice - it's most appreciated :)<!--content-->
 
Back
Top