lundi 5 avril 2021

ColdFusion : 2 CheckBoxes : Allow 1 Selected : CSS Javascript

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#"> 



Aucun commentaire:

Enregistrer un commentaire