User Guide

cfinput 245
range Optional;
All
Minimum and maximum allowed numeric values.
ColdFusion uses this attribute only if you specify range
in the
validate attribute.
If you specify a single number or a single number
followed by a comma, it is treated as a minimum, with no
maximum. If you specify a comma followed by a
number, the maximum is set to the specified number,
with no minimum.
maxLength Optional;
All
Maximum length of text entered, if
type = "Text" or
"password". For complete length validation, specify
maxLength validation in a
validate attribute; otherwise,
this attribute prevents users from typing beyond the
specified length, but does not prevent them from
pasting in a longer value.
pattern Required if
validate =
"regex";
HTML and
XML
format only
JavaScript regular expression pattern to validate input.
ColdFusion uses this attribute only if you specify regex
in the
validate attribute.
Omit leading and trailing slashes. For examples and
syntax, see Chapter 27, “Building Dynamic Forms with
cfform Tags” in ColdFusion MX Developer’s Guide.
onValidate Optional;
HTML and
XML only
Custom JavaScript function to validate user input. The
form object, input object, and input object values are
passed to the routine, which should return True if
validation succeeds, and False otherwise. If used, the
validate attribute is ignored.
onError Optional;
HTML and
XML only
Custom JavaScript function to execute if validation fails.
size Optional;
All
Size of input control. Ignored, if
type = "radio" or
"checkbox". If specified in a Flash form, ColdFusion sets
the control width pixel value to 10 times the specified
size and ignores the
width attribute
value depends on
type
setting;
All
HTML: corresponds to the HTML value attribute. Its use
depends on control type.
Flash: optional; specifies text for button type inputs:
button, submit, and image.
bind Optional;
Flash only
A Flash bind expression that populates the field with
information from other form fields. For details, see
Usage.
checked Optional;
All
False Selects a radio or checkbox control:
True
False
Attribute Req/Opt;
Formats
Default Description