Paul,

it's not too clear what you are really trying to accomplish by placing the 
cfif tags within the cfinput. if you are trying to have a radio button 
display only when the varFromDB EQ english then you would want to put your 
CFIF tags outside your cfinput tags.

so your code would be like

<CFIF qryName.varfldEnglish EQ 'Yes'>
  <CFINPUT type="Radio" name-"fldLanguage">
</CFIF>

the reason why your example won't work is that you are making two arguments 
without stringing them together.

what you are saying is i have a var from the database (never use "is" by the 
way) = english, checked = Yes.

If you have two criteria which you want to your cfif statement to meet, you 
could do it two different ways:

rewrite your query so that only those records where english = Yes are 
displayed

in your cfif statement rewrite it to say

<CFIF qryName.fldName EQ 'English' AND qryName.fldName EQ 'YES'>

I hope that answers your question.

good luck and cheers,

nelson



----Original Message Follows----
From: "Paul Sinclair" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: <cfif> : Okay within <cfinput> tag?
Date: Fri, 05 Jan 2001 17:20:07 -0500
Received: from [207.31.122.140] by hotmail.com (3.2) with ESMTP id 
MHotMailBC1F93320085D820F3A1CF1F7A8C788A0; Fri Jan 05 14:18:31 2001
Received: from houseoffusion.com ([207.31.122.140])          by 
www.houseoffusion.com (Post.Office MTA v3.5.3 release 223          ID# 
0-54969U100L100S0V35) with ESMTP id com          for 
<[EMAIL PROTECTED]>;          Fri, 5 Jan 2001 17:30:36 -0500
>From [EMAIL PROTECTED] Fri Jan 05 14:19:09 2001
Message-id: <[EMAIL PROTECTED]>

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

Reply via email to