Tony Tony - 2 months ago 20
HTML Question

HTML checkbox - allow to check only one checkbox

I have some checkboxes in each row in my table. Each one checkbox has

name='myName'
because I want to select only one checkbox in each row. But something I'm missing because I'm able to check all of them:

enter image description here

but I want that result:

enter image description here

what am I missing here ?

Answer

The unique name identifier applies to radio buttons:

<input type="radio" />

change your checkboxes to radio and everything should be working