Insert coldfusion text fields, Insert coldfusion hidden fields – Adobe Dreamweaver CC 2014 v.13 User Manual
Page 560
3. Click the control on the page to select it and then set its properties in the Property inspector.
For information on the properties of specific controls, see the topics about the controls.
Insert ColdFusion text fields
You can visually insert a ColdFusion text field or password field into your form, and then set its options.
Note: This enhancement is available only if you have access to a computer running ColdFusion MX 7 or later.
Visually insert a ColdFusion text field
1. In Design view, place the insertion point inside the form outline.
2. In the CFForm category of the Insert panel, click the CF Text Field icon or select Insert > ColdFusion Objects > CFForm > CFtextfield.
A text field appears in the form.
3. Select the text field and set its properties in the Property inspector.
4. To label the text field on the page, click beside it and enter text for the label.
Visually insert a password field
1. Repeat steps 1 and 2 in the previous procedure for inserting a text field.
2. Select the inserted text field to display its Property inspector.
3. Select the Password value from the Text Mode pop-up menu in the Property inspector.
CFTextField options (ColdFusion)
To set the options of a ColdFusion text or password field, set any of the following options in the CFTextField Property inspector:
CFtextfield Sets the id attribute of the
Value Lets you specify text to be displayed in the field when the page first opens in a browser. The information can either be static or dynamic.
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 text field when you view the form in a browser.
Text Mode Lets you switch between the standard text input field and the password input field. The attribute modified by this control is type.
Read Only Lets you make the displayed text read-only.
Max Length Sets the maximum number of characters accepted by the text field.
Mask Lets you specify a mask for your requested text. You use this property to validate the user input. The mask format is composed of A, 9, X
and ? characters.
Note: The mask attribute is ignored for the cfinput type="password" tag.
Validate Specifies the type of validation for the current field.
Validate At Specifies when the field is validated: onSubmit, onBlur or onServer.
Label Lets you specify a label for the text 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 text field 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 hidden fields
You can visually insert a ColdFusion hidden field into your form and set its properties. Use hidden fields to store and submit information that the
user does not enter. The information is hidden from the user.
Note: This enhancement is available only if you have access to a computer running ColdFusion MX 7 or later.
1. In Design view, place the insertion point inside the form outline.
2. In the CFForm category of the Insert panel, click the CF Hidden Field icon.
A marker appears in the ColdFusion form. If you don’t see the marker, select View > Visual Aids > Invisible Elements.
3. Select the hidden field on the page and set any of the following options in the Property inspector:
Cfhiddenfield Lets you specify the unique name for the hidden field.
Value Lets you specify a value for the hidden field. The data can either be static or dynamic.
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.
553