Operation Manual
640
USING DREAMWEAVER
Building forms
Last updated 3/28/2012
Dreamweaver provides a number of enhancements for ColdFusion developers who use ColdFusion MX 7 or later as
their development server. These enhancements include more Insert panel buttons, menu items, and Property
inspectors so that you can rapidly build and set the properties of ColdFusion forms. You can also generate code that
validates the information provided by site visitors. For example, you can check that the e-mail address provided by a
user contains the @ symbol, or that a required text field contains a certain type of value.
Enable the ColdFusion enhancements
Some of these enhancements require that you define a computer running ColdFusion MX 7 or later as a testing server
for Dreamweaver. For example, the Property inspectors for form controls are available only if you specify the correct
testing server.
You define a testing server only once. Dreamweaver then automatically detects the testing server version and makes
the enhancements available if it detects ColdFusion.
1 If you haven’t already done so, define a Dreamweaver site for your ColdFusion project.
2 Select Site > Manage Sites, select your site from the list, and click Edit.
3 Select the Servers category and specify a computer running ColdFusion MX 7 or later as the testing server for your
Dreamweaver site. Ensure that you specify a valid Web URL.
4 Open any ColdFusion document.
You won’t see any visible changes to the Dreamweaver work space until you open a ColdFusion document.
More Help topics
“Securing a folder in your application (ColdFusion)” on page 615
“Working with Dreamweaver sites” on page 34
“Set up a testing server” on page 43
Create ColdFusion forms
You can use a number of Insert panel buttons, menu items, and Property inspectors to rapidly create ColdFusion
forms and set their properties in Dreamweaver.
Note: These enhancements are available only if you have access to a computer running ColdFusion MX 7 or later.
1 Open a ColdFusion page and place the insertion point where you want the ColdFusion form to appear.
2 Select Insert > ColdFusion Objects > CFForm > CFForm, or select the CFForm category from the Insert panel and
click the CF Form icon.
Dreamweaver inserts an empty ColdFusion form. In Design view, the form is indicated by a dotted red outline. If you
don’t see this outline, make sure that View
> Visual Aids > Invisible Elements is selected.
3 Ensure that the form is still selected, and then use the Property inspector to set any of the following form properties.
CFForm Sets the name of the form.
Action Lets you specify the name of the ColdFusion page to be processed when the form is submitted.
Method Lets you define the method that the browser uses to send the form data to the server:
• POST Sends the data using the HTTP post method; this method sends the data in a separate message to the server.
• GET Sends the data using the HTTP get method, placing the form field contents in the URL query string.
Target Lets you to modify the value of the target attribute of the cfform tag.