Inside Coldfusion MX
<cfinput type = "input_type" name = "name" value = "initial_value" required = "Yes" or "No" range = "min_value, max_value" validate = "data_type" onValidate = "javascript_function" pattern = "regexp" message = "validation_msg" onError = "text" size = "integer" maxLength = "integer" checked passThrough = "HTML_attributes"> Description
Used within the CFFORM tag to place radio buttons, check boxes, or text boxes on a form. Can also provide input validation if the validate attribute is specified. Attributes
type (Optional) Default: text
name (Required) Name for the form element. value Initial value for the form element. required (Optional) Default: No range (Optional) Minimum and maximum value range separated by a comma. Can only be used with numeric data. validate (Optional) Verifies a value's format:
onValidate (Optional) Can be used to call a custom JavaScript function to validate the input. If used, the validate attribute is ignored. pattern (Required if validate = "regular_expression") A JavaScript regular expression pattern from which to validate the input. message (Optional) Message text to display if validation fails. onError (Optional) Custom JavaScript function to execute if validation fails. size (Optional) Display size of the input. Ignored if type = "radio" or "checkbox". maxLength (Optional) Maximum length of text entered if type = "text" or " password". checked (Optional) Selects a control. No value is required. Only works for type = "radio" or "checkbox". passThrough (Optional) Ignores HTML attributes that are not supported by CFINPUT and passes them to the generated page. |