Jump to content

Newbie needs help - radio buttons


Recommended Posts

Hi - I'm new to dreamweaver and all this sql stuff [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]

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? [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
Link to comment
Share on other sites

Try naming all of the radio buttons for the same question the same name, but give each radio a different value.

blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>
blah blah blah <name=Q2 val=1> <name=Q2 val=2> <name=Q2 val=3> <name=Q2 val=4>
....

This should make it so you can select one radio button for each row.
Link to comment
Share on other sites

[!--quoteo(post=373805:date=May 14 2006, 01:06 PM:name=_will)--][div class=\'quotetop\']QUOTE(_will @ May 14 2006, 01:06 PM) [snapback]373805[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Try naming all of the radio buttons for the same question the same name, but give each radio a different value.

blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>
blah blah blah <name=Q2 val=1> <name=Q2 val=2> <name=Q2 val=3> <name=Q2 val=4>
....

This should make it so you can select one radio button for each row.
[/quote]

I've tried that but I can only set the top line:
blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>

because the other rows in the table are generated on runtime using 'repeat region'
Link to comment
Share on other sites

[!--quoteo(post=373813:date=May 14 2006, 02:43 PM:name=bubble_gum)--][div class=\'quotetop\']QUOTE(bubble_gum @ May 14 2006, 02:43 PM) [snapback]373813[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I've tried that but I can only set the top line ... because the other rows in the table are generated on runtime using 'repeat region'[/quote]
Does that mean your 'editor' is too smart to allow you to edit your own code????
Link to comment
Share on other sites

lol [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]

No what i mean is I made a table with 1 row and 5 colums:

questiontext-------answer1---------answer2--------answer3--------answer4

In each of the columns that contains answer1 - 4 there is also a radio button (all some name but values 1 - 4)

From here I put a 'repeat region' around the table so on run time I can view all 5 questions (one per row) and all 20 radio buttons and answers (4 of each per row)

So I can't name the radio buttons for each line sepretatly as they are just repeats of the first row

Any ideas?

also is there a way to add attachments onto my post so I can show you a screenshot?
Link to comment
Share on other sites

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]From here I put a 'repeat region' around the table so on run time ...[/quote]
Sorry if this seems like a really dumb question, but 'repeat region' is what? An ASP thing? A Dreamweaver thing? Some kind of server behaviour? Some kind of shortcut coding technique? If it's uncontrollable then don't use it. Isn't there any documentation with this whatever it is that explains how to do the perfectly simple task you're trying to do?

Isn't the answer to getting what you want in your code to actually write the code instead of using an automated tool that doesn't allow you to get the code you want?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.