0

I have a form which has 2 check boxes available for selection.

It is for an activity - where 1 can be a player or a goalie. But not both. But Some activities do not have a Goalie.

But they can only check one of the 2 on same row. I tried an ID in the checkbox.

I know I can do with a Radio button. But sometimes only 1 checkbox is there. As the activity may not have a Goalie. And if only 1 Radio u can't turn on/off.

I can double check things on the backend, but I'm wondering if there is some easy CSS/Javascript to only allow one of the check boxes at a time per row.

<input type="checkbox" name="PLAYER" id="#shinid#" value="#shinid#"> 
<input type="checkbox" name="GOALIE" id="#shinid#" value="#shinid#"> 
Merle_the_Pearl
  • 1,391
  • 3
  • 18
  • 25
  • Use ColdFusion code to decide which type of input to include in the generated HTML page. If only one option then include a checkbox, if more than one then include radio buttons. – Miguel-F Apr 05 '21 at 18:33
  • Yea I did that on the back end. I punt them back if they select 2 on same line. If I switch to Radio it needs to handle differently in the backend. So I prefer to just handle 1 way in back end. I was hoping for an easy HTML/Java trick. – Merle_the_Pearl Apr 06 '21 at 15:46

0 Answers0