cfinput

"-->
 <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

  • text. Creates a text entry box control.

  • radio. Creates a radio button control.

  • checkbox. Creates a check box control.

  • password. Creates a password entry control.

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:

  • date. US date mm/dd/yyyy.

  • eurodate. European date dd/mm/yyyy.

  • time. Time hh:mm:ss.

  • float. Floating point entry.

  • integer. Integer entry.

  • telephone. Telephone ###-###-####.

  • separator. Hyphen or blank. Area code and exchange must begin with a digit 1 - 9.

  • zipcode. (U.S. formats only) 5-digit ##### or 9-digit #####-####.

  • separator. Hyphen or blank.

  • creditcard. Strips blanks and dashes; uses the mod10 algorithm.

  • social_security_number. ###-##-####.

  • separator. Hyphen or blank.

  • regular_expression. Matches input against regular expression specified by the pattern attribute.

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.



Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net