Dreamweaver - Forms - Adding a radio group
Go to the forms tab on the Insert menu:
Click on the icon to create a new form. In Design view, the form is outlined by a dashed red line.
Once you've created a form, move your cursor inside the form area. Then click on the icon to add a new radio group. This pops up a window like this:
A radio group is a set of radio buttons that are mutually exclusive. Only one radio button in the group can be selected at one time.
Here's the code for that example:
- The "Name:" field is the name that all the radio buttons will have.
- The "+" button adds another radio button to the group. Likewise, the "-" button removes a radio button.
- The up and down arrows change the position of the last selected radio button.
- The "Label" column is the text that will appear to the right of the radio button.
- The "Value" column is the value that is associated with the radio button.
- You can lay out the radio group using either line breaks or a table. There is no real difference between the two, but tables are harder to edit afterwards.
This example also uses a hidden field.
Since a radio group is just a set of radio buttons with the same name, you can edit them just like radio buttons.