Dreamweaver

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.

Note: For ASP.NET pages, you must use a DropDownList or ListBox form control.

Before you begin, you must insert an HTML form in a ColdFusion, PHP, ASP, or JSP page, and you must define a recordset or other source of dynamic content for the menu.

  1. Insert an HTML List/Menu form object in your page:
    1. Click inside the HTML form on the page (Insert > Form > Form).
    1. Select Insert > Form > List/Menu to insert the form object.
  2. 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.

  3. Complete the Dynamic List/Menu dialog box, and click OK.
    1. 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.
    2. 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.
    3. (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.
    4. In the Values pop‑up menu, select the field containing the values of the menu items.
    5. In the Labels pop‑up menu, select the field containing the labels for the menu items.
    6. (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.