User Guide
cfinput 247
Note: Attributes that are marked as not supported in XML are not handled by the skins provided with
ColdFusion MX. They are, however, included in the generated XML.
Usage
For this tag to work properly. the browser must be JavaScript-enabled.
If the
cfform preserveData attribute is true and the form posts back to the same page, the
posted value of the cfinput control is used, instead of its Value or Checked attribute.
You can use the keyboard to access and select dates from a
datefield Flash input: press Tab to go
to the field and press the Spacebar to open the menu. Use the Up, Down, Left, and Right Arrow
keys to change the selected date. Use the Home and End keys to reach the first and last enabled
date in a month, respectively. Use the Page Up and Page Down keys to reach the previous and
next month, respectively.
Note: To clear a datefield entry, select the field to open the menu, and click the selected date.
For more information, see cfform. For information on using JavaScript regular expressions with
this tag, see Chapter 27, “Building Dynamic Forms with cfform Tags” in ColdFusion MX
Developer’s Guide.
Validation
The following sections describe how to do validation in cfinput tags.
Validation methods ColdFusion provides four methods of validation of cfinput text and
password fields.
You can specify one or a combination of the following in the
validateAt attribute:
• onSubmit The form page on the browser includes JavaScript functions that perform
validation before the form is submitted to the server. In Flash format forms, this option is
identical to onBlur.
enabled Optional;
Flash
Yes Boolean value specifying whether the control is
enabled. A disabled control appears in light gray. The
inverse of the
disabled attribute.
visible Optional;
Flash
Yes Boolean value specifying whether to show the control.
Space that would be occupied by an invisible control is
blank.
tooltip Optional;
Flash
Text to display when the mouse pointer hovers over the
control.
height Optional;
see
Description
Applies to most Flash types, HTML image type on
some browsers. The height of the control, in pixels. The
displayed height might be less than the specified size.
width Optional;
see
Description
Applies to most Flash types, HTML image type on
some browsers. The width of the control, in pixels. For
Flash forms, ColdFusion ignores this attribute if you also
specify a
size attribute value.
Attribute Req/Opt;
Formats
Default Description










