To add an HTML form to an update page:
Create a new Coldfusion page (File > New).
1
Lay out your page using the Dreamweaver design tools.
2
Add an HTML form by placing the insertion point where you want the form to appear and
3
selecting Insert > Form > Form.
An empty form is created on the page. You may have to turn on Invisible Elements (View >
Visual Aids > Invisible Elements) to see the form's boundaries, which are represented by
thin red lines.
Name the HTML form by clicking the
4
select the form, opening the Property inspector (Window > Properties), and entering a name in
the Form Name text box.
You don't have to specify an
to send the record data when the user clicks the Submit button. The Update Record server
behavior sets these attributes for you.
Add a form object such as a text field (Insert > Form > Text Field) for each column you want
5
to update in the database table.
The form objects are for data entry. Text fields are common for this purpose, but you can also
use menus, checkboxes, and radio buttons.
Each form object should have a corresponding column in the recordset you defined earlier.
The only exception is the unique key column, which should have no corresponding
form object.
For more information on form objects, see
Add a Submit button to the form (Insert > Form > Button).
6
You can change the label of the Submit button by selecting the button, opening the Property
inspector (Window > Properties), and entering a new value in the Label text box.
To display the record in the form:
Make sure you defined a recordset to hold the record the user wants to update.
1
For more information, see
Bind each form object to data in the recordset, as described in the following sections:
2
"Displaying dynamic content in HTML text fields" on page 618
"Dynamically preselecting HTML checkboxes" on page 618
"Dynamically preselecting HTML radio buttons" on page 619
"Creating a dynamic HTML form menu" on page 617
"Making existing HTML form menus dynamic" on page 618
654
Chapter 40: Building ColdFusion Applications Rapidly
tag at the bottom of the Document window to
<form>
or
attribute for the form to tell it where and how
action
method
"Inserting HTML form objects" on page
"Retrieving the record to update (ColdFusion)" on page
613.
652.
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers