Dreamweaver CS4 Resources
|
Insert or change a dynamic HTML form menu
You can dynamically populate an HTML form
menu or list menu with entries from a database. For most pages,
you can use an HTML menu object.
Before you begin, you must
insert an HTML form in a ColdFusion, PHP, or ASP page, and you must
define a recordset or other source of dynamic content for the menu.
- Insert an HTML List/Menu form object in your page:
- Click inside the HTML form on the page (Insert >
Form > Form).
- Select Insert > Form > List/Menu
to insert the form object.
- Do one of the following:
Select the new or an existing HTML List/Menu
form object, and then click the Dynamic button in the Property inspector.
Select Insert > Data Objects >
Dynamic Data > Dynamic Select List.
- Complete the Dynamic List/Menu dialog box, and click
OK.
- In the Options From Recordset pop‑up menu,
select the recordset to use as a content source. You also use this
menu to edit both static and dynamic list/menu items later.
- In the Static Options area, enter a default item in
the list or menu. Also, use this option to edit static entries in
a list/menu form object after adding dynamic content.
- (Optional) Use the Plus (+) and Minus (–) buttons
to add and remove items in the list. Items are in the same order
as in the Initial List Values dialog box. The first item on the
list is the selected item when the page is loaded in a browser. Use
the up and down arrow buttons to rearrange items in the list.
- In the Values pop‑up menu, select the field containing
the values of the menu items.
- In the Labels pop‑up menu, select the field containing
the labels for the menu items.
- (Optional) To specify that a particular menu item
is selected when the page opens in a browser or when a record is
displayed in the form, enter a value equal to the menu item’s value,
in the Select Value Equal To box.
You can enter a static value or you can specify a dynamic
one by clicking the lightning bolt icon beside the box, and selecting
a dynamic value from the list of data sources. In either case, the
value you specify should match one of the menu item values.
|