User Guide

Chapter 1: ColdFusion Tags 217
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>
Example <!--- This example shows the use of CFTEXTINPUT --->
<HTML>
<HEAD>
<TITLE>
CFTEXTINPUT Example
</TITLE>
</HEAD>
<BODY bgcolor=silver>
<H3>CFTEXTINPUT Example</H3>
CFTEXTINPUT can be used to provide simple validation for text
fields in CFFORM and to have control over font information
displayed in CFFORM input boxes for text. For example, the field
provided below must not
be blank, and provides a client-side message upon erring.
<CFFORM ACTION="cftextinput.cfm" METHOD="POST" ENABLECAB="Yes">
<CFIF IsDefined("form.myInput")>
<H3>You entered <CFOUTPUT>#form.myInput#</CFOUTPUT> into the text box
</H3>
</CFIF>
<CFTEXTINPUT NAME="myInput" FONT="Courier" FONTSIZE=12
VALUE="Look, this text is red!" TEXTCOLOR="FF0000"
MESSAGE="This field must not be blank" REQUIRED="Yes">
<INPUT TYPE="Submit" NAME="" VALUE="submit">
</CFFORM>
</BODY>
</HTML>