BackUp LevelNext

CFINPUT

CFINPUT is used inside CFFORM to place radio buttons, checkboxes, or text boxes. Provides input validation for the specified control type.

You can add standard HTML FORM tag attributes and their values to the CFINPUT tag. These attributes and values are passed directly through ColdFusion to the browser in creating a form. For example, FORM tag attributes like TARGET can be used to enhance your CFFORM features.

CFINPUT supports the JavaScript onClick event in the same manner as the HTML INPUT tag:

<CFINPUT TYPE="radio"
    NAME="radio1"
    onClick="JavaScript_function">

Syntax

<CFINPUT TYPE="input_type"
    NAME="name"
    VALUE="initial_value"
    REQUIRED="Yes/No"
    RANGE="min_value, max_value"
    VALIDATE="data_type"
    ONVALIDATE="javascript_function"
    MESSAGE="validation_msg"
    ONERROR="text"
    SIZE="integer"
    MAXLENGTH="integer"
    CHECKED="Yes/No">

TYPE

Optional. Valid entries are:

NAME

Required. A name for the form input element.

VALUE

Optional. An initial value for the form input element.

REQUIRED

Optional. Enter Yes or No. Default is No.

RANGE

Optional. Enter a minimum value, maximum value range separated by a comma. Valid only for numeric data.

VALIDATE

Optional. Valid entries are:

ONVALIDATE

Optional. The name of a valid JavaScript function used to validate user input. The form object, input object, and input object value are passed to the specified routine, which should return true if validation succeeds and false otherwise. When used, the VALIDATE attribute is ignored.

MESSAGE

Optional. Message text to appear if validation fails.

ONERROR

Optional. The name of a valid JavaScript function you want to execute in the event of a failed validation.

SIZE

Optional. The size of the input control. Ignored if TYPE is Radio or Checkbox.

MAXLENGTH

Optional. The maximum length of text entered when TYPE is Text.




BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.