Hi,
I have a form that contains multiple groups of checkboxes that act
like radio buttons (at the clients insistance).
There is one text field that is required and 28 checkbox groups.
Here an example of a checkbox group:
<td><input type="checkbox" name="trusted" value="1" id="ck_ttt1"
onclick="...
<td><input type="checkbox" name="trusted" value="2" id="ck_ttt2"
onclick=...
There are 5 more of these "groups"
My mind is mush and I cannot get them to validate, here is what I got:
var count = 0;
for (var i = 0 ; i < form.by.length ; i++) {
if (form.by[i].checked) {count++}
}
if (count == 0) {
alert("You forgot to indicate if you are a peer, direct report,
customer, or other to the assessed.");
return false; // validation failed
} else {
return true; // validation succeded
}
var count = 0;
for (var i = 0 ; i < form.bigpicture.length ; i++) {
if (form.bigpicture[i].checked) {count++}
}
if (count == 0) {
alert("In the Leadership area, you forgot to check the big picture
option.");
return false; // validation failed
} else {
return true; // validation succeded
}
Thanks
Kim