Not sure if you ever solved this problem or not but Ive done similar types 
of apps that involve forcing line breaks into formatted form results from 
textarea's. Ill grab a snippet or 2.

<CF_Snippet>

<cfset break="#code#">
<!--- Replace all line breaks with <br /> so the message is formatted 
correctly. --->
<cfset break=ReplaceNoCase(break, chr(10), "<br />", "All")>
<!--- If users has put 5 cariage returns in a row, remove them --->
<cfset break=ReplaceNoCase(break,"<br />" & chr(13) & "<br />" & chr(13) & 
"<br />" & chr(13),"","All")>

</CF_Snippet>

There #code# would be the value from the textarea. As Dylan Bromby suggests 
in this last email message by him, you will want to use virtual wrap 
"<TEXTAREA WRAP="Virtual">".

Note that this only adds the appropriate line breaks to a message that is 
going to be inserted into a database. For email messages you probably wont 
be able to use this technique but something similar might work. Hopefully 
this lil' code snippet will get you on the right track.

HTH,
Mike



>From: "Dylan Bromby" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: RE: Inserting line breaks
>Date: Wed, 13 Dec 2000 09:50:36 -0800
>
>If you're using a form to input the text that gets emailed, try using
>TEXTAREA with WRAP="VIRTUAL"
>
>-----Original Message-----
>From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, December 13, 2000 8:47 AM
>To: CF-Talk
>Subject: Inserting line breaks
>
>
>Hey guys:
>
>I have a form that sends an e-mail to someone and then displays the
>information that was sent.  However, the message body just displays itself
>on one line.  I was wondering if I could go through the string and after a
>certain number of characters I would insert a line break.
>
>
>
>Greg
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to