PDA

View Full Version : newbie needs help - radio buttons


bubblegum
05-14-2006, 02:12 PM
Hi - I'm new to dreamweaver and all this sql stuff :oops:

I have managed to make a site but I need some help with some radio buttons:

I have five lines of text each with four different options the user can choose (they choose one option from each line of blah blah blah text). I then have four text options for each line. Each option has a radio button next to it so the user can choose the option they want for each line.

blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4

The blah blah blah is from a field in my sql table and the text for my options 1 - 4 are also fields from my table. They are all repeated via a 'repeat region' set out in a table on my form. but heres my problem:

If I add the radio buttons and call them Q1, Q2, Q3, Q4 when they get repeated and I end up with all 20 buttons (four for each line as required) I can't choose one from each line going across but I can choose just one going downwards but thats the opposite to what I need.

If I call them all Q1 I can only choose one at a time out of the 20 I have

Any ideas? :D

dthomsen8
05-14-2006, 05:30 PM
Hi - I'm new to dreamweaver and all this sql stuff
Any ideas? :D

Are you recording the results of your form with MySQL?

Are you using PHP?

Can you provide a URL or post the HTML resulting from Dreamweaver form creation?

You don't provide enough information for a more helpful reply. You certainly should be able to have radio buttons to choose from on each of the lines.

bubblegum
05-14-2006, 05:44 PM
Hi - sorry I have added an attachment to show what i'm trying to do it might explain a little better. I'm using dreamweaver with a little php and I have some tables in sql

I have a row containing four colums each containing a recordset and a radiobutton

The radiobuttons are named as follows - this works correctly when I take out the repeat and have just four answers and four radiobuttons on one row but I need to repeat the region so I can view all five rows (one row per question)

<tr>
<td bordercolor="#000000" bgcolor="#FFFFCC"><input name="A1" type="radio" value="1" >
<?php echo $row_Recordset2['Answer1']; ?></td>
<td bordercolor="#000000" bgcolor="#FFFFCC"><input name="A1" type="radio" value="2" >
<?php echo $row_Recordset2['Answer2']; ?></td>
<td bordercolor="#000000" bgcolor="#FFFFCC"><input name="A1" type="radio" value="3" >
<?php echo $row_Recordset2['Answer3']; ?></td>
<td bordercolor="#000000" bgcolor="#FFFFCC"><input name="A1" type="radio" value="4" >
<?php echo $row_Recordset2['Answer4']; ?></td>
</tr>

I have put these in a repeat region so I get all the five questions and 20 different possible answers (4 answers for each question)

dthomsen8
05-15-2006, 12:35 PM
Why can't you copy and paste the code that works, which you show us above, four times, and change the names as needed?

I don't know what you mean by "repeat region" but it seems to me that is what is causing you problems. Do the repeats yourself in the code window, and change the names, and that should do it.