User Guide

414 Chapter 2: ColdFusion Tags
pattern Required if
validate =
"regular_
expression"
HTML and
XML.
JavaScript regular expression pattern to validate input.
Omit leading and trailing slashes. ColdFusion uses this
attribute only if you specify regex in the
validate attribute.
For examples and syntax, see Chapter 27, “Building
Dynamic Forms with cfform Tags” in ColdFusion MX
Developer’s Guide.
onValidate Optional;
HTML and
XML
Custom JavaScript function to validate user input. The
JavaScript DOM form object, input object, and input
object value are passed to routine, which should return
True if validation succeeds, False otherwise. If you specify
this attribute, ColdFusion ignores the
validate attribute.
onError Optional;
HTML and
XML
Custom JavaScript function to execute if validation fails.
disabled Optional;
All
not
disabled
Disables user input, making the control read-only. To
disable input, specify
disabled without an attribute, or
disabled="Yes" (or any ColdFusion positive Boolean
value, such as True). To enable input, omit the attribute or
specify
disabled="No" (or any ColdFusion negative
Boolean value, such as False).
value Optional;
All
Initial value to display in text control. You can specify an
initial value as an attribute or in the tag body, but not in
both places. If you specify the value as an attribute, you
must put the closing
cftextarea tag immediately after the
opening
cftextarea tag, with no spaces or line feeds
between, or place a closing slash at the end of the
opening
cftextarea tag; for example <cftextarea
name="description" value="Enter a description." />.
bind Optional;
Flash
A Flex bind expression that populates the field with
information from other form fields. For details, see Usage.
onKeyUp Optional;
All
JavaScript (HTML/XML) or ActionScript (Flash) to run
when the user releases a keyboard key in the control.
onKeyDown Optional;
All
JavaScript (HTML/XML) or ActionScript (Flash)
ActionScript to run when the user presses a keyboard key
in the control.
onMouseUp Optional;
All
JavaScript (HTML/XML) or ActionScript (Flash) to run
when the user presses a mouse button in the control.
onMouseDown Optional;
All
JavaScript (HTML/XML) or ActionScript (Flash) to run
when the user releases a mouse button in the control.
onChange Optional;
All
JavaScript (HTML/XML) or ActionScript (Flash) to run
when the control changes due to user action.
onClick Optional;
All
JavaScript (HTML/XML) to run when the user clicks the
control. Not supported for Flash forms.
Attribute Req/Opt;
Format
Default Description