Reputation: 6672
I have a group of radio buttons in a multiple select quiz form and i'm having a bit of trouble with the buttons. When I try to click any other radio button apart from the 1st one, it instantly shows the 1st radio button as selected and it takes 3-4 attempts to finally mark the desired button. This is my code if you want to test it:
<form action="<?php echo $editFormAction; ?>" method="post" name="form" target="_self" id="form1">
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="greentitle">Question 1</td>
<td>
<label>
<input type="radio" name="environment" value="1" />1
<input type="radio" name="environment" value="2" />2
<input type="radio" name="environment" value="3" />3
<input type="radio" name="environment" value="4" />4
<input type="radio" name="environment" value="5" />5
</label>
</td>
</tr>
<tr>
<td class="greentitle">Question 2</td>
<td>
<input name="speed" type="radio" value="1" />1
<input name="speed" type="radio" value="2" />2
<input name="speed" type="radio" value="3" />3
<input name="speed" type="radio" value="4" />4
<input name="speed" type="radio" value="5" />5
</td>
</tr>
<tr>
<td class="greentitle">Question 3</td>
<td>
<input name="quality" type="radio" value="1" />1
<input name="quality" type="radio" value="2" />2
<input name="quality" type="radio" value="3" />3
<input name="quality" type="radio" value="4" />4
<input name="quality" type="radio" value="5" />5
</td>
</tr>
<tr>
<td class="darkgrey"> </td>
<td><input name="submit" type="submit" class="formmed" id="submit" value="Submit" tabindex="5" style="width:200px;"/></td>
</tr>
</table>
</form>
Upvotes: 0
Views: 544
Reputation: 2389
I have gone through your code.
Remove the label tag from the first radio(name="environment"
) group. Then it will work fine.
Upvotes: 3