You can use a number of Insert bar buttons, menu items, and Property inspectors to rapidly create ColdFusion forms and set their properties in Dreamweaver.
These enhancements are only available if you have access to a computer running ColdFusion MX 7 or later. For more information, see Enabling the ColdFusion enhancements.
- Open a ColdFusion page and place the insertion point where you want the ColdFusion form to appear.
- Select Insert > ColdFusion Objects > CFForm > CFForm, or select the CFForm category from the Insert bar 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 dont see this outline, make sure that View > Visual Aids > Invisible Elements is selected.
- Make sure the form is still selected and then use the Property inspector to specify the page or script that will process the form data.
In the Property inspector, type the path of the page or script in the Action text box, or click the folder icon beside the text box and navigate to the page or script.
If you dont see the Action text box in the Property inspector, click the form outline in the Document window to select the form.
- In the Method pop-up menu, select the method you want to use to transmit the form data to the server:
Default uses the browsers default setting to send the form data to the server. Typically, the default is the
GET appends the value to the URL requesting the page.
POST embeds the form data in the HTTP request.
For more information, click the Help icon on the Property inspector.
- Insert ColdFusion form controls.
Place the insertion point where you want the ColdFusion form control to appear in the ColdFusion form, and then select the control from the Insert menu (Insert > ColdFusion Objects > CFForm), or from the CFForm category in the Insert bar.
For more information, see Inserting ColdFusion form controls.
- If required, set the properties of the control with the Property inspector.
Make sure the control is selected in Design view and then set the properties in the Property inspector. For more information on the properties, click the Help icon in the Property inspector.
- Adjust the layout of the ColdFusion form.
If youre creating an HTML-based form, you can use line breaks, paragraph breaks, preformatted text, or tables to format your forms. You cannot insert a ColdFusion form in another ColdFusion form (that is, you cannot overlap tags), but you can include more than one ColdFusion form in a page.
If youre creating a Flash-based form, use CSS styles to lay out your form. ColdFusion ignores any HTML in the form.
Remember to label the ColdFusion form fields with descriptive text to let users know what they are responding to. For example, create a "Type your name label" to request name information.