How to allow only one checkbox to be checked?
Posted on 2012-04-05
I know that I can do the validation via PHP upon form submission but, I'd like to do the check on the fly. I don't need to throw an alert but, rather I would like to make it so that if they check one box and then check another, the original check would move to the second box.
<form id="myform" name="myform" method="POST">
<input name="option1" type="checkbox" value="1" />
<input name="option2" type="checkbox" value="1" />
<input name="option3" type="checkbox" value="1" />