cftextinput

Puts a single-line text entry box in a cfform tag and controls its display characteristics.

 <cftextinput name="">

 cftextinput(name="");

The cftextinput tag was REMOVED from ColdFusion 11 and has been DEPRECATED since ColdFusion 7

Attribute Reference for the cftextinput tag

name

Required: Yes
Name for the cftextinput control.

value

Required: No
Initial value to display in text control.

required

Required: No
Yes: the user must enter or change text
No

range

Required: No
Minimum-maximum value range, delimited by a comma.
Valid only for numeric data.

validate

Required: No
date: verifies format mm/dd/yy.
eurodate: verifies date format dd/mm/yyyy.
time: verifies time format hh:mm:ss.
float: verifies floating point format.
integer: verifies integer format.
telephone: verifies telephone format ###-###-####. The
separator can be a blank. Area code and exchange must
begin with digit 1 - 9.
zipcode: verifies, in U.S. formats only, 5- or 9-digit
format #####-####. The separator can be a blank.
creditcard: strips blanks and dashes; verifies number using
mod10 algorithm. Number must have 13-16 digits.
social_security_number: verifies format ###-##-####. The
separator can be a blank.
regular_expression: matches input against pattern
attribute. Values:
  • date
  • eurodate
  • time
  • float
  • integer
  • telephone
  • zipcode
  • creditcard
  • social_security_number
  • regular_expression

onvalidate

Required: No
Custom JavaScript function to validate user input. The form
object, input object, and input object value are passed to
routine, which should return True if validation succeeds,
False otherwise. The validate attribute is ignored.

pattern

Required: No
JavaScript regular expression pattern to validate input.
Omit leading and trailing slashes

message

Required: No
Message text to display if validation fails

onerror

Required: No
Custom JavaScript function to execute if validation fails.

size

Required: No
Number of characters displayed before horizontal scroll
bar displays.

font

Required: No
Default: arial
Font name for data in tree control. Values:
  • arial
  • times
  • courier
  • arialunicodeMS

fontsize

Required: No
Font size for text in tree control, in points.

italic

Required: No
Default: NO
Yes: displays tree control text in italics
No: it does not

bold

Required: No
Default: NO
Yes: displays tree control text in bold
No: it does not

height

Required: No
Tree control height, in pixels.

width

Required: No
Tree control width, in pixels.

vspace

Required: No
Vertical margin above and below tree control, in pixels.

hspace

Required: No
Horizontal spacing to left and right of tree control, in pixels.

align

Required: No
* top
* left
* bottom
* baseline
* texttop
* absbottom
* middle
* absmiddle
* right Values:
  • top
  • left
  • bottom
  • baseline
  • texttop
  • absbottom
  • middle
  • absmiddle
  • right

bgcolor

Required: No
Background color of control. For a hex value, use the form:
textColor = "##xxxxxx", where x = 0-9 or A-F; use two hash
signs or none. Values:
  • black
  • red
  • blue
  • magenta
  • cyan
  • orange
  • darkgray
  • pink
  • gray
  • white
  • lightgray
  • yellow

textcolor

Required: No
Text color for control. For a hex value, use the form:
textColor = "##xxxxxx", where x = 0-9 or A-F; use two hash
signs or none. Values:
  • black
  • red
  • blue
  • magenta
  • cyan
  • orange
  • darkgray
  • pink
  • gray
  • white
  • lightgray
  • yellow

maxlength

Required: No
The maximum length of text entered.

notsupported

Required: No
Default: <b>Browser must support Java to <br>view ColdFusion Java Applets!</b>
Text to display if a page that contains a Java applet-based
cfform control is opened by a browser that does not
support Java or has Java support disabled.
Default:
"Browser must support Java to
view ColdFusion Java
Applets!
"

label

Required: No
Label for text input

Compatibility

ColdFusion:

DEPRECATED since version 7 REMOVED in version 11

Fork me on GitHub