Insert coldfusion file fields – Adobe Dreamweaver CC 2015 User Manual

Page 623

Advertising
background image

616

Dynamic sites, pages and web forms

Last updated 6/3/2015

Note: If the image is outside the site root folder, you should copy the image to the root folder. Images outside the root
folder might not be accessible when you publish the site.

3

Select the image field on the page and set any of the following options in the Property inspector:

Cfimagefield

Lets you specify a unique name for the control.

Src

Lets you specify the URL of the inserted image.

Alt

Lets you specify a message when the image cannot be displayed.

Align

Lets you specify the alignment of the picture.

Border

Lets you set the width of the image border.

Edit Image

Opens the image in your default image editor.

To define a default image editor, select Edit > Preferences > File Types / Editors. Otherwise, the Edit Image button
does not perform any action.

Validate

Specifies the type of validation for the image field.

Validate At

Specifies when the field is validated: onSubmit, onBlur, or onServer.

Label

Lets you specify a label for the radio button.

Pattern

Lets you specify a JavaScript regular expression pattern to validate input. Omit leading and trailing slashes.

For more information, see the ColdFusion documentation.

Height

Lets you specify the height of the control, in pixels.

Width

Lets you specify the width of the control, in pixels.

Size

Lets you specify the size of the control. This property is ignored by the ColdFusion server at run time.

Required

Lets you specify whether the control must contain data before the form is submitted to the server.

Display Tag Editor

Lets you edit properties not listed in the Property inspector.

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

Note: This enhancement is available only if you have access to a computer running ColdFusion MX 7 or later.

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.

Advertising
This manual is related to the following products: