The cftextinput tag is similar to the HTML input=text tag. With cftextinput, however, you can also specify font and alignment options, as well as enable input validation methods using either a JavaScript or the validate attribute.
The following example shows a basic cftextinput control. This example validates a date entry, which means that a user must enter a valid date in the form mm/dd/yy (the year can be up to four digits). For a complete list of validation formats, see the CFML Reference.
Please enter a date:<br>
<cfform name="Form1"
action="submit.cfm"
method="Post">
<cftextinput name="entertext"
value="mm/dd/yy"
maxlength="10"
validate="date"
font="Trebuchet MS">
<br>
<br>
<input type="Submit"
value="Submit">
</cfform>
To get the value of the input text in the action page, use the variable Form.textinput_name; in this case, Form.entertext.
LiveDocs comments are not longer enabled for ColdFusion 5.0. Please use one of the following resources instead.
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 5.0