MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 85

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
Example
<!--- This example shows the use of CFINPUT controls in
a CFFORM --->
<HTML>
<HEAD>
<TITLE>
CFFORM Example
</TITLE>
</HEAD>
<BODY>
<H3>CFFORM Example</H3>
<CFIF IsDefined("form.oncethrough") is "Yes">
<CFIF IsDefined("form.testVal1") is True>
<H3>Results of Radio Button Test</H3>
<CFIF form.testVal1 is "Yes">Your radio button answer was yes</CFIF>
<CFIF form.testVal1 is "No">Your radio button answer was no</CFIF>
</CFIF>
<CFIF IsDefined("form.chkTest2") is True>
<H3>Results of Checkbox Test</H3>
<CFELSE>
</CFIF>
<CFIF IsDefined("form.textSample") is True
AND form.textSample is not "">
<H3>Results of Credit Card Input</H3>
</CFIF>
<CFIF IsDefined("form.sampleSlider") is "True">
<H3>You gave this page a rating of <CFOUTPUT>#form.sampleSlider#
</CFOUTPUT></H3>
</CFIF>
<hr noshade>
</CFIF>
<!--- begin by calling the cfform tag --->
<CFFORM ACTION="cfform.cfm" METHOD="POST" ENABLECAB="Yes">
<TABLE>
<TR>
<TD>
<H4>This example displays the radio button input type
for CFINPUT.</H4>
Yes <CFINPUT TYPE="Radio" NAME="TestVal1" VALUE="Yes" CHECKED="yes">
No <CFINPUT TYPE="Radio" NAME="TestVal1" VALUE="No">
</TD>
</TR>
<TR>
<TD>
<H4>This example displays the checkbox input type for CFINPUT.</H4>
Your checkbox answer was yes
<H3>Results of Checkbox Test</H3>
Your checkbox answer was no
Your credit card number, <CFOUTPUT>#form.textSample#</CFOUTPUT>,
was valid under the MOD 10 algorithm.
61

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents