Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form and Radio Buttons

Status
Not open for further replies.

edgarv

MIS
Jul 25, 2003
248
US
Hello,
I am learning HTML,
I am trying to build a form with some radio buttons.
I have 12 questions and 9 of them have radio buttons, the problem is, when I click on a radio buton of for example question 1 and then I click on a readio button on question 2 the radio button checked on question 1 dissapears and goes to the one on question 2 the same thing happens if I go to any of the radio buttons on the rest of the questions. how can I get the radio buttons to behave?

thank you for the help
 
They ARE behaving. That's the way radio buttons are supposed to work. When you check one the others are unchecked. If that's not the behavior you want, then you should use checkboxes instead.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
yes I understand that, perhaps I was not clear enough

question 1 radio button 1 radio button 2
question 2 radio button 1 radio button 2
question 3 radio button 1 radio button 2

if I click on radio button 1 of question 1 it should saty there, but if I click on radio button 1 of question 2 it jumps from question 1 to question 2 or if I skip question 2 and go to question 3 and click on button 1 the click from question 1 button 1 goes to button1 question 3

does that make sence?
 
The radio buttons for each question should have a different name.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
this is what my html look like


<table width="985" border="0" cellpadding="8" cellspacing="8" summary="feedback form">
<!--DWLayoutTable-->
<tr>
<td width="94" height="38">1.</td>
<td width="380" valign="top">Information about or products? ( Website )</td>
<td width="431" valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio2">
<label for="radio2">5</label> <label for="radiobutton"></label> <input type="radio" name="radiobutton" value="radiobutton" id="radio">
<label for="radio">4
<input type="radio" name="radiobutton" value="radiobutton" id="radio3">
3
<input type="radio" name="radiobutton" value="radiobutton" id="radio4">
2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio5">
<label for="radio5">1</label></td>
</tr>
<tr>
<td height="38">2.</td>
<td valign="top">Ease of the ordering process?</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio6">
<label for="radio6">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio7">
<label for="radio7">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio8">
<label for="radio8">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio9">
<label for="radio9">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio10">
<label for="radio10">1</label></td>
</tr>
<tr>
<td height="38">3.</td>
<td valign="top">Quoting process (Responsiveness and Informative?)</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio11">
<label for="radio11">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio12">
<label for="radio12">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio13">
<label for="radio13">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio14">
<label for="radio14">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio15">
<label for="radio15">1</label></td>
</tr>
<tr>
<td height="38">4.</td>
<td valign="top">Ability to track the status of an order?</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio16">
<label for="radio16">5
<input type="radio" name="radiobutton" value="radiobutton" id="radio17">
4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio18">
<label for="radio18">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio19">
<label for="radio19">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio20">
<label for="radio20">1</label></td>
</tr>
<tr>
<td height="38">5.</td>
<td valign="top">On-Time Delivery?</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio21">
<label for="radio21">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio22">
<label for="radio22">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio23">
<label for="radio23">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio24">
<label for="radio24">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio25">
<label for="radio25">1</label></td>
</tr>
<tr>
<td height="38">6.</td>
<td valign="top">Order meets specifications?</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio26">
<label for="radio26">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio27">
<label for="radio27">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio28">
<label for="radio28">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio29">
<label for="radio29">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio30">
<label for="radio30">1</label></td>
</tr>
<tr>
<td height="38">7.</td>
<td valign="top">Accuracy of Invoicing?</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio31">
<label for="radio31">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio32">
<label for="radio32">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio33">
<label for="radio33">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio34">
<label for="radio34">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio35">
<label for="radio35">1</label></td>
</tr>
<tr>
<td height="38">8.</td>
<td valign="top"><p>Accuracy of Documentation?</p>
</td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio36">
<label for="radio36">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio37">
<label for="radio37">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio38">
<label for="radio38">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio39">
<label for="radio39">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio40">
<label for="radio40">1</label></td>
</tr>
<tr>
<td height="38">9.</td>
<td valign="top"><p>Overall meets expectations? ( If the rating is 3 or
less please</p>
<p>explain in the comments section.</p></td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio41">
<label for="radio41">5</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio42">
<label for="radio42">4</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio43">
<label for="radio43">3</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio44">
<label for="radio44">2</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio45">
<label for="radio45">1</label></td>
</tr>
<tr>
<td height="38">10.</td>
<td valign="top"><p>Are you familiar with or range of product capabilities?</p>
<p>(If No, please explain in the comments secction)</p></td>
<td valign="top"><input type="radio" name="radiobutton" value="radiobutton" id="radio46">
<label for="radio46">Yes</label> <input type="radio" name="radiobutton" value="radiobutton" id="radio47">
<label for="radio47">No</label></td>
</tr>
<tr>
<td height="38">11.</td>
<td valign="top">What other plastic products can we manufacture for you?</td>
<td valign="top"><input type="text" name="name" size="70" /></td>
</tr>
<tr>
<td height="38">12.</td>
<td valign="top">Would you like to setup a preset delivery schedule?</td>
<td valign="top"><input type="text" name="name" size="70" /></td>
</tr>
<tr>
<td height="35">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="297" colspan="3" valign="top"> Comments<br /> <textarea rows="15" cols="100%" name="comments">
</textarea>
</td>
</tr>
<tr>
<td height="59" colspan="3" align="center" valign="top"> <input type="submit" value="Send Feedback" />
<br /> </td>
</tr>
</table>
</form>
 
Yes, you named them ALL radiobutton so they're all part of the same group. You need to name each group something different, like tsdragon said. You have different IDs, but the same name, which is the significant thing here.

Lee
 
ahhhh sorry for being so thick headed, already thinking about the weekend :)

thank you so very much I really appreciate it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top