Just use a standard radio button if you want to put conditional logic in.
If you are using the <CFINPUT type="radio"> you will have to have the <cfif>
outside and have multiple options, ie:

<cfif something>
    <cfinput type="radio" name="somefield" checked value="x">
<cfelse>
    <cfinput type="radio" name="somefield" value="x">
</cfif>

I have long since come to the conclusion that CFFORM and its pieces are much
like CFINSERT/CFUPDATE/CFDELETE. Yes, they work, but you are better off
taking the time to write the code yourself.

Dave Crawford

----- Original Message -----
From: "Brendan Avery" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 17:31
Subject: Re: <cfif> : Okay within <cfinput> tag?


> not okay.  you can't nest tag brackets within CFML, ever.
>
> At 05:20 PM 1/5/2001 -0500, you wrote:
> >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