Inserting ColdFusion file fields
You can visually insert a ColdFusion file field into your form and set its properties. Use a file field to let users select a file from their computer, such as a word processing document or a graphics file, and upload it to the server. A ColdFusion file field looks like other text fields, except it also has a Browse button. Users can manually enter the path to the file they want to upload, or use the Browse button to locate and select the file.
File fields require that you use the
POST method to transmit files from the browser to the server. The file is posted to the address that you specify in the forms Action text box. Contact your server administrator to confirm that anonymous file uploads are allowed before using a file field in your form.
File fields also require that the form encoding be set to multipart/form. Dreamweaver sets this automatically when you insert a file field control.
This Dreamweaver enhancement is only available if you have access to a computer running ColdFusion MX 7 or later. For more information, see Enabling the ColdFusion enhancements.
To visually insert a ColdFusion file field:
- In Design view, select the CFForm to display its Property inspector.
To quickly select the form, click anywhere in the form outline and click the
<cfform> tag in the tag selector at the bottom of the Document window.
- In the Property inspector, set the form method to POST.
- From the Enctype pop-up menu, select multipart/form-data.
- Position the insertion point inside the form outline where you want to file field to appear.
- In the CFForm category of the Insert bar, click the CF File Field icon.
A file field appears in the document.
- In the Property inspector, set the file field properties.
For more information, click the Help icon in the Property inspector.
- Setting the properties of ColdFusion form controls visually