home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cftextinput.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  906 b   |  38 lines

  1. <!--- This example shows the use of CFTEXTINPUT --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. CFTEXTINPUT Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BODY bgcolor=silver>
  12.  
  13. <H3>CFTEXTINPUT Example</H3>
  14.  
  15. CFTEXTINPUT can be used to provide simple validation for text
  16. fields in CFFORM and to have control over font information
  17. displayed in CFFORM input boxes for text.  For example, the field provided below must not
  18. be blank, and provides a client-side message upon erring.
  19.  
  20. <P>
  21.  
  22. <CFFORM ACTION="cftextinput.cfm" METHOD="POST" ENABLECAB="Yes">
  23.  
  24. <CFIF IsDefined("form.myInput")>
  25. <H3>You entered <CFOUTPUT>#form.myInput#</CFOUTPUT> into the text box</H3>
  26.  
  27. </CFIF>
  28.  
  29. <CFTEXTINPUT NAME="myInput" FONT="Courier" FONTSIZE=12 VALUE="Look, this text is red!" TEXTCOLOR="FF0000" MESSAGE="This field must not be blank" REQUIRED="Yes">
  30.  
  31.  
  32. <INPUT TYPE="Submit" NAME="" VALUE="submit">
  33. </CFFORM>
  34.  
  35. </BODY>
  36.  
  37. </HTML>       
  38.