CFTEXTINPUT  
 
 

The CFTEXTINPUT form custom control allows you to place a single-line text entry box in a CFFORM. In addition to input validation, the tag gives you control over all font characteristics.

 
 
  Note  
 

CFTEXTINPUT incorporates a Java applet, so a browser must be Java-enabled for CFTEXTINPUT to work properly.

 
 
  Syntax  
 
<CFTEXTINPUT NAME="name"
    VALUE="text"
    REQUIRED="Yes/No"
    RANGE="min_value, max_value"
    VALIDATE="data_type"
    ONVALIDATE="script_name"
    MESSAGE="text"
    ONERROR="text"
    SIZE="integer"
    FONT="font_name"
    FONTSIZE="integer"
    ITALIC="Yes/No"
    BOLD="Yes/No"
    HEIGHT="integer"
    WIDTH="integer"
    VSPACE="integer"
    HSPACE="integer"
    ALIGN="alignment"
    BGCOLOR="color"
    TEXTCOLOR="color"
    MAXLENGTH="integer"
    NOTSUPPORTED="text">

NAME

Required. A name for the CFTEXTINPUT control.

VALUE

Optional. Initial value that appears in the text control.

REQUIRED

Optional. Yes or No. If Yes, the user must enter or change text. 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:

  • date -- Verifies US date entry in the form mm/dd/yy.
  • eurodate -- Verifies valid European date entry in the form dd/mm/yyyy.
  • time -- Verifies a time entry in the form hh:mm:ss.
  • float -- Verifies a floating point entry.
  • integer -- Verifies an integer entry.
  • telephone -- Verifies a telephone entry. Telephone data must be entered as ###-###-####. The hyphen separator (-) can be replaced with a blank. The area code and exchange must begin with a digit between 1 and 9.
  • zipcode -- (U.S. formats only) Number can be a 5-digit or 9-digit zip in the form #####-####. The hyphen separator (-) can be replaced with a blank.
  • creditcard -- Blanks and dashes are stripped and the number is verified using the mod10 algorithm.
  • social_security_number -- Number must be entered as ###-##-####. The hyphen separator (-) can be replaced with a blank.

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. Number of characters displayed before horizontal scroll bar appears.

FONT

Optional. Font name for text.

FONTSIZE

Optional. Font size for text.

ITALIC

Optional. Enter Yes for italicized text, No for normal text. Default is No.

BOLD

Optional. Enter Yes for boldface text, No for medium text. Default is No.

HEIGHT

Optional. Height value of the control, in pixels.

WIDTH

Optional. Width value of the control, in pixels.

VSPACE

Optional. Vertical spacing of the control, in pixels.

HSPACE

Optional. Horizontal spacing of the control, in pixels.

ALIGN

Optional. Alignment value. Valid entries are:

  • Top
  • Left
  • Bottom
  • Baseline
  • TextTop
  • AbsBottom
  • Middle
  • AbsMiddle
  • Right

BGCOLOR

Optional. Background color of the control. Valid entries are:

  • black
  • magenta
  • cyan
  • orange
  • darkgray
  • pink
  • gray
  • white
  • lightgray
  • yellow

A hex value can also be entered in the form:

BGCOLOR="##xxxxxx"

Where x is 0-9 or A-F. Use either two pound signs or no pound signs.

TEXTCOLOR

Optional. Text color for the control. See BGCOLOR for color options.

MAXLENGTH

Optional. The maximum length of text entered.

NOTSUPPORTED

Optional. The text you want to display if the page containing a Java applet-based CFFORM control is opened by a browser that does not support Java or has Java support disabled. For example:

NOTSUPPORTED="<B> Browser must support Java to
view ColdFusion Java Applets</B>"

By default, if no message is specified, the following message appears:

<B>Browser must support Java to <BR>
view ColdFusion Java Applets!</B>




 
 
BackUp LevelNext
 
 

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