Name

CFINPUT — Enhanced in ColdFusion 5.0

Synopsis

<CFINPUT>

Creates text and password input controls, as well as checkboxes and radio buttons, within a CFFORM.

Attributes

NAME=" name "

The form-field name for the input control. Required.

TYPE=" type "

Type of input control to create. Valid entries are Checkbox, Password, Radio, and Text. Optional. The default value is Text.

VALUE=" initial_value "

The initial value for the input control. Optional.

SIZE=" integer "

The size of the input control. Optional. Ignored when ACTION is Checkbox or Radio.

MAXLENGTH=" integer "

The maximum number of characters to accept for a Password or Text input control. Optional.

CHECKED="Yes|No"

Whether or not a checkbox or radio button input control should be checked. Optional. The default is No.

REQUIRED="Yes|No"

Whether or not the input control requires a value before being submitted. Optional. The default is No.

RANGE=" min_value , max_value "

A range of acceptable numeric values for the form-field. Optional.

VALIDATE=" data_type "

Validates the contents of the form-field before it is submitted, using one of the following criteria:

CreditCard

Validates the form-field data using the mod10 algorithm. A credit-card number can be entered as a single value or with dashes or spaces. ColdFusion automatically strips dashes and spaces before validating.

Date

Requires the form-field value to be in the U.S. date format, mm / dd / yyyy.

EuroDate

Requires the form-field value to be in the European ...

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.