home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 February
/
CHIPCD_02_2002.iso
/
Internet
/
Macromedia ColdFusion Server 5
/
coldfusion-50-win-us.exe
/
data1.cab
/
Examples
/
CFDOCS
/
snippets
/
cftextinput.cfm
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
2001-06-13
|
953 b
|
39 lines
<!--- This example shows the use of CFTEXTINPUT --->
<HTML>
<HEAD>
<TITLE>
CFTEXTINPUT Example
</TITLE>
</HEAD>
<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY bgcolor="#FFFFD5">
<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.
<P>
<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>