Use the iif() statement inside the cfinput
<cfinput type = "Radio" name = "language"
checked = " #iif(variablefromdb is 'english','Yes','No')#" >
-----Original Message-----
From: Paul Sinclair [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 3:20 PM
To: CF-Talk
Subject: <cfif> : Okay within <cfinput> tag?
I've got a cfform with a couple <cfinput type = "Radio"> tags in it. I'm
trying to put a <cfif> statement within the <cfinput type = "Radio"> tag but
I keep getting an error. I'm not sure if my syntax is wrong or whether this
is just not allowed. The code is along the lines of:
<cfinput type = "Radio" name = "language" <cfif variablefromdb is 'english'>
checked = "Yes"</cfif> >
The error always references the opening left caret ( < ) that begins the
<cfif> statement. It seems like you should certainly be able to use <cfif>
conditions inside <cfinput> tags but I can't get it working. When I take out
the <cfif> statements, it works fine.
Thanks for help.
Paul Sinclair
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists