Inserting ColdFusion file fields

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 form’s 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:

  1. 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.

  2. In the Property inspector, set the form method to POST.
  3. From the Enctype pop-up menu, select multipart/form-data.
  4. Position the insertion point inside the form outline where you want to file field to appear.
  5. In the CFForm category of the Insert bar, click the CF File Field icon.

    A file field appears in the document.

  6. In the Property inspector, set the file field properties.

    For more information, click the Help icon in the Property inspector.

Related topics

  • Setting the properties of ColdFusion form controls visually


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Reference
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly