I have a webpage form for voting on a value in multiple categories. For example, i have a persons name, with a list of possible nick names for that person. For example:
Tony
-Tones
-Tiger
-Tiny
-Txxx
-Tyyy
I have multiple radio buttons per person, with each radio section designed as such:

 $HTML.='<tr><td><Input type = "Radio" Name ="'.$FullName.'" value= "'.$CustomNameID.'">'.$CustomName.'</tr></td>';

So the radio button has a Name=Tony Value=12, then the value is the custom name, say Tiger. I have another person, say Bob, with names of Billy, etc etc. And the radio buttons for that group use his name for the 'name' field.

I would like to limit 3 selections per person. Say there are 5 names, i want to allow up to 3 choices per person. I think i should switch to check boxes for this (i think radio only allows a single choice per group??). What i would have issues with is the validation on this, i have tried using some javascript, but my attempts have failed. Does anyone have any suggestions to how best to change from radio to check boxes and have validation for UP to 3 choices per person?

Thanks very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.