HTML Form problem

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
I have 2 radio buttons.

Problem is they can both be selected? :confused:

Can someone tell me how to stop this happening and only have one selected at a time?

Cheers
 

MrScott81

Golden Member
Aug 31, 2001
1,891
0
76
I'm guessing that you don't have the same value for the value attribute for both radio buttons...here's an example of a working radio button selection:

<form>
Male:
<input type="radio" checked name="Sex" value="male" />
<br />
Female:
<input type="radio" name="Sex" value="female" />
</form>
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Originally posted by: scottdog81
I'm guessing that you don't have the same value for the value attribute for both radio buttons...here's an example of a working radio button selection:

<form>
Male:
<input type="radio" checked name="Sex" value="male" />
<br />
Female:
<input type="radio" name="Sex" value="female" />
</form>

my bad, thank you :eek: