Modify coldfusion form controls, Validate coldfusion form data – Adobe Dreamweaver CC 2015 User Manual
Page 625
618
Dynamic sites, pages and web forms
Last updated 6/3/2015
To specify a dynamic value, click the lightning bolt icon beside the Value box and select a recordset column in the
Dynamic Data dialog box. The recordset column supplies a value to the date field when you view the form in a
browser.
Validate
Specifies the type of validation for the field.
Validate At
Specifies when the field is validated: onSubmit, onBlur, or onServer.
Label
Lets you specify a label for the field.
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.
Required
Lets you specify whether the date field must contain a value before the form is submitted to the server.
Display Tag Editor
Lets you edit properties not listed in the Property inspector.
Modify ColdFusion form controls
You can visually change the properties of ColdFusion form controls whether you’re working in Design view or Code
view.
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 form control on the page; in Code view, click anywhere inside the control’s tag.
The Property inspector displays properties of the form control.
2
Change the control’s properties in the Property inspector.
For more information, click the Help icon in the Property inspector.
3
To set more properties, click the Display Tag Editor button in the Property inspector and set the properties in the
Tag editor that appears.
Validate ColdFusion form data
You can build ColdFusion forms in Dreamweaver that check the contents of specified fields to ensure the user entered
the correct data type.
Note: This enhancement is available only if you have access to a computer running ColdFusion MX 7 or later.
1
Create a ColdFusion form that includes at least one input field and one Submit button. Ensure that every ColdFusion
field that you want to validate has a unique name.
2
Select a field in the form that you want to validate.
3
In the Property inspector, specify how you want to validate the field.
The lower part of each input Property inspector contains controls to help you define the specific validation rule. For
example, you might want to specify that a text field should contain a telephone number. To do this, select Telephone
from the Value pop-up menu in the Property inspector. You can also specify when to validate from the Validate At
pop-up menu.