Building Text Entry Boxes
Building Text Entry Boxes
The
however, you can also specify font and alignment options, as well as enable input
validation methods using either a JavaScript or the
The following example shows a basic
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"
</cfform>
To get the value of the input text in the action page, use the variable
Form.textinput_name; in this case, Form.entertext.
tag is similar to the HTML
cftextinput
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">
=text tag. With
input
validate
control. This example validates a
cftextinput
165
,
cftextinput
attribute.