SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Provo Utah
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Radio Button Help

    I can't seem to find the attibute to have only one radio button selected at a time. Doing a search on google has been fruitless but it may be due to my brain thinking its Saturday. My current code belows allows all buttons to be checked. I want each line to have only one. Can I do this in a simple way from the form? Or do I have to write a script checker?

    Code:
    <form action="cgi-bin/FormMail.pl" method="post">
    <input type="hidden" name="recipient" value="myemailaddress@mydomain.com">
    <input type="hidden" name="redirect" value="http://www.mydomainname.com/group_thankyou.htm">
    <input type="hidden" name="subject" value="Group Feedback">
    <table><tr>
    <td align="right" class="text">Accommodations (Overall)</td>
    	<td align="center" class="text"><input type="radio" name="LodgingExcellent" value="Lodging Excellent"></td>
    	<td align="center" class="text"><input type="radio" name="LodgingGood" value="Lodging Good"></td>
    	<td align="center" class="text"><input type="radio" name="LodgingAverage" value="Lodging Average"></td>
    	<td align="center" class="text"><input type="radio" name="LodgingFair" value="Lodging Fair"></td>
    	<td align="center" class="text"><input type="radio" name="LodgingPoor" value="Lodging Poor"></td>
      </tr></table>
    <input type="submit" name="submit" value="Send Feedback">
    </form>
    http://www.eransworld.com -bored look at my boring website

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try giving them all the same name!

    Think about it: a radio group lets you choose mutually-exclusive values, matched up to - a common name.

    ....name="lodging_review" value="Excellent"></....

    What search terms did you use?

    http://www.google.com/search?hl=en&l...tml+form+radio
    ::: certified wild guess :::

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Provo Utah
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I figured it out. My buttons need to be named the same. Sorry I am so not at work today.

    thanks
    Colorspots
    http://www.eransworld.com -bored look at my boring website


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •