Building Form Controls  
 
 

Like its HTML counterpart the INPUT tag, CFINPUT supports the following form input controls:

  • Radio buttons
  • Check boxes
  • Text entry boxes
  • Password entry boxes

CFINPUT also allows is input validation using one of two methods: attributes in the CFINPUT tag, or a JavaScript that you specify.

 
 
  Example: CFINPUT controls  
 

The following application page contains a form with a variety of CFINPUT controls:

<CFFORM NAME="Form1" ACTION="submit.cfm" METHOD="Post">

<TABLE CELLPADDING=5 border=0>
    <TR><TD>Please enter your user login:<BR>
    <CFINPUT TYPE="text" NAME="loginID" VALUE="name"></TD></TR>
    <TR><TD>Please also enter your password:<BR>
    <CFINPUT TYPE="password" NAME="pwd" VALUE="password"></TD></TR>
    <TR><TD>Please select one:<BR>
    <CFINPUT TYPE="radio" NAME="radio1" VALUE="select1">Embodied<BR>
    <CFINPUT TYPE="radio" NAME="radio1" CHECKED="yes" VALUE="select2">
    Disembodied<BR>
    <CFINPUT TYPE="radio" NAME="radio1" VALUE="select3">Don't
    Know</TD></TR>
    <TR><TD>Make your selections here:<BR>
    <CFINPUT TYPE="checkbox" NAME="checkbox1" VALUE="one">Derrida<BR>
    <CFINPUT TYPE="checkbox" NAME="checkbox1" CHECKED="yes"
    VALUE="two">Foucault<BR>
    <CFINPUT TYPE="checkbox" NAME="checkbox1" VALUE="three">
    Kristeva</TD></TR>
    <TR><TD><INPUT TYPE="Submit" VALUE="Submit"></TD></TR>
</TABLE>

</CFFORM>

This code generates the following form:



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.