> I'm trying to include a cfif within a cfmail. If a form element is "K-12", 
> then I want to add a cc to the cfmail part.
>
> Here is what I have in part:
>
> <CFMAIL from="#FORM.email#"
> To="t...@test.com"
> <cfif #form.intype#="K-12">cc="te...@test2.com"</Cfif>
> Subject="New Jersey">
>
> It generates an error. Is there a better way to do this?

You can't embed one CFML tag within another CFML tag, only within the
contents of that tag. Ben gave you a specific solution, which should
work fine for you, but I thought this was worth clarifying. You could
use the IIF function to accomplish this also, but I find that to be
less readable.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331027
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to