Dreamweaver CS4 Resources
|
Dynamically preselect an HTML radio button
Dynamically preselect an HTML radio
button when a record is displayed in the HTML form in a browser.
Before
you begin, you must create the form in a ColdFusion, PHP, or ASP
page, and insert at least one group of HTML radio buttons (Insert >
Form > Radio Group). You must also define a recordset
or other source of dynamic content for the radio buttons. Ideally,
the source of content should contain Boolean data, such as Yes/No
or true/false.
- In Design view, select a radio button in the radio
group.
- In the Property inspector, click the Dynamic button.
- Complete the Dynamic Radio Group dialog box, and click
OK.
Set the Dynamic Radio Group dialog box options- In the Radio Button Group pop‑up menu,
select a form and radio button group in the page.
The Radio Button Value box displays the values of all radio
buttons in the group.
- Select a value to dynamically preselect from the list
of values. This value is displayed in the Value box.
- Click the lightning bolt icon beside the Select Value
Equal To box and select a recordset that contains possible checked
values for the radio buttons in the group.
The recordset you select contains values that match the
radio buttons’ checked values. To view the checked values of the
radio buttons, select each radio button and open its Property inspector
(Window > Properties).
- Click OK.
Set the Dynamic Radio Group dialog box options (ColdFusion)- Select a radio group and form from the
Radio Group pop‑up menu.
- Click the lightning bolt icon next to Select Value Equal
To box.
- Complete the Dynamic Data dialog box, and click OK.
- Select a data source from the list of data
sources.
- (Optional) Select a data format for the text.
- (Optional) Modify the code that Dreamweaver inserts in your page to display
the dynamic text.
- Click OK to close the Dynamic Radio Group dialog box,
and insert the dynamic content placeholder in the Radio Group.
|