Seona Bellamy wrote:
> Hi guys,
>
> Can someone please look at this and tell me what's wrong with it? I'm 
> sure it's something really simple, but I just can't see it.
>
> I have the following piece of code:
> <cfinput class="chkb" name="advertising" id="advertising" 
> type="checkbox" value="1"<cfif form.advertising> checked="checked"</cfif>>

You can't put a cf tag inside a cf tag which is effectively what you 
have done with the <cfif...> as an attribute.

Try:
<cfif form.advertising>
 <cfset chkstring =  ' checked="checked"'>
<cfelse>
 <cfset chkstring =  "">
</cfif>
<cfinput class="chkb" name="advertising" id="advertising" 
type="checkbox" value="1"#chkstring#>

HTH

Kym K

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to