CFINPUT

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

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" or "No"
    RANGE="min_value, max_value"
    VALIDATE="data_type"
    ONVALIDATE="javascript_function"
    MESSAGE="validation_msg"
    ONERROR="text"
    SIZE="integer"
    MAXLENGTH="integer"
    CHECKED="Yes" or "No"
    PASSTHROUGH="HTML_attributes">
TYPE

Optional. Valid entries are:

  • Text — Creates a text entry box control (default).

  • Radio — Creates a radio button control.

  • Checkbox — Creates a ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.