beautypg.com

About dynamic form objects, Insert or change a dynamic html form menu – Adobe Dreamweaver CS3 User Manual

Page 615

background image

DREAMWEAVER CS3

User Guide

608

Height

(List type only) Sets the number of items displayed in the menu.

Selections

(List type only) Indicates whether the user can select multiple items from the list.

List Values

Opens a dialog box that lets you add the items to a form menu:

1

Use the Plus (+) and Minus (–) buttons to add and remove items in the list.

2

Enter label text and an optional value for each menu item.

Each item in the list has a label (the text that appears in the list) and a value (the value that is sent to the processing
application if the item is selected). If no value is specified, the label is sent to the processing application instead.

3

Use the up and down arrow buttons to rearrange items in the list.

Items appear in the menu in the same order as they appear in the List Values dialog box. The first item on the list is
the selected item when the page is loaded in a browser.

Dynamic

Lets the server dynamically select an item in the menu when it is first displayed.

Class

Lets you apply CSS rules to the object.

Initially Selected

Sets the items selected in the list by default. Click the item or items in the list.

Hidden field object options

HiddenField

Specifies the name for the field.

Value

Assigns a value to the field. This value is passed to the server when the form is submitted.

Class

Applies CSS rules to the object.

About dynamic form objects

A dynamic form object is a form object whose initial state is determined by the server when the page is requested
from the server, not by the form designer at design time. For example, when a user requests a PHP page that contains
a form with a menu, a PHP script in the page automatically populates the menu with values stored in a database. The
server then sends the completed page to the user’s browser.

Making form objects dynamic can simplify site maintenance. For example, many sites use menus to present users
with a set of options. If the menu is dynamic, you can add, remove, or change menu items in a single place—the
database table in which the items are stored—to update all instances of the same menu on the site.

See also

“Defining sources of dynamic content” on page 547

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:

a

Click inside the HTML form on the page (Insert > Form > Form).

September 4, 2007