tags:

views:

54

answers:

2

Hi, I have form with 2 radio buttons but both of the radio buttons can be selected,

     <form class="descriptions" id="collection"  method="post" action="">
                          <table width="200">
                              <tr>
                                <td>
                                  <label>Collection</label>
                                  <input type="radio" value="collection" />
                       </td>
                                <td>
                                  <label>Delivery</label>
                                  <input type="radio" value="delivery"    />
                                </td>  
                            </tr>
                         </table>

                </form>

I know this is very easy but I can't seem to find the answer, any help would be appreciated.

+7  A: 

Give them the same name.

Noon Silk
Thanks,it works.
amir
+1  A: 

Description of the radio button control type in the HTML 4.01 specification:

Radio buttons are like checkboxes except that when several share the same control name, they are mutually exclusive: when one is switched "on", all others with the same name are switched "off".

Gumbo