Name
cfinput
Synopsis
<cfform> <cfinput> ... </cfform>
Creates text and password input controls,
as well as checkboxes and radio buttons, within a
cfform.
New in ColdFusion MX, if the preservedata
attribute of the cfform tag is set to
Yes, radio button and checkbox types are checked
provided the value of the control matches the value of the posted
data.
Attributes
-
name="name" The form-field name for the input control. Required.
-
checked="Yes|No" Whether or not a checkbox or radio button input control should be checked. Optional. The default is
No.-
maxlength="integer" The maximum number of characters to accept for a
PasswordorTextinput control. Optional.-
message="validation_message" Text to appear if validation fails. Optional.
-
onerror="function_name" The name of a JavaScript function that should be executed if validation fails for any reason. Optional.
-
onvalidate="javascript_function" A JavaScript validation function that should be executed before the form is submitted. Specifying a value for
onvalidateoverrides any values set in thevalidateattribute. Optional.-
passthrough="HTML_attribute" Any additional HTML attributes you need to pass that aren’t directly supported by the
cfinputtag. Optional.-
pattern="javascript_regular_expression" JavaScript regular expression that matches form input when
validateisRegular_Expression.patternmay contain ColdFusion variables and expressions as they are evaluated prior to the execution of the regular expression. Optional. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access