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

cftextinput Attribute Reference

name
Required

Name for the cftextinput control.

value

Initial value to display in text control.

required

Yes: the user must enter or change text
No

range

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

validate

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

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

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

message

Message text to display if validation fails

onerror

Custom JavaScript function to execute if validation fails.

size

Number of characters displayed before horizontal scroll
bar displays.

font
Default: arial

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

fontsize

Font size for text in tree control, in points.

italic
Default: NO

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

bold
Default: NO

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

height

Tree control height, in pixels.

width

Tree control width, in pixels.

vspace

Vertical margin above and below tree control, in pixels.

hspace

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

align

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

bgcolor

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

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

The maximum length of text entered.

notsupported
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

Label for text input

Compatibility

ColdFusion:

DEPRECATED since version 7 REMOVED in version 11

Fork me on GitHub