Hi All,
I'm using <cfsavecontent> to format a flat text message to be subsequently
used in a CFMAIL block.  I figured out how to add spaces Using chr(32).
Problem is, how do I suppress CFIF statements (if a variable is empty such
as the newContact.title, I want the whole line suppressed).  Right now, the
output shows a space where the CFIF statement would be.

Here's a few lines of code:

<!--- Format the message for the site owner ////--->
<cfset space = chr(32)>
<cfsavecontent variable="VARIABLES.SiteOwnerMessage"><cfoutput>This
information was created on the #REQUEST.co_name# Contact Form page.
FROM:#space##Trim(newContact.firstname)##space##Trim(newContact.lastname)#
-----------------------------------------------
E-Mail:#space##Trim(newContact.emailaddress)#
-----------------------------------------------
<cfif
Len(newContact.company)>Company:#space##Trim(newContact.company)#</cfif>
<cfif
Len(newContact.title)>Title:#space##space##space##space##space##space##space
##space##space##Trim(newContact.title)#</cfif>

And so on ...

Any ideas?

Mark


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to