I have a table cell that lights up when selected. There will be many buttons on the page but only one choice can be made at a time. How can I make them mutually exclusive using hidden input radio tags? (in order to handle the group later)
<td class="choice-option"> <input type="radio" name="trainChoice" id="cheese0032" > <p>10€</p> </td> <td class="choice-option"> <input type="radio" name="trainChoice" id="cheese0033" > <p>7€</p> </td>
For the input tag I was thinking of putting an onclick event on the td like:
Also I was thinking an onclick for the and send it to a .js with a function to switch the radio button to true.
When the button is clicked the radio button doesn't toggle to true. How do I make it do that?
Any advice would help greatly, thanks in advance!