cfmail and textarea formatting issues
Hello everybody, I have a text area in my form for users to add comments. form name=frm action="" method=post textarea name=userComment/xtextarea input type=submit name=sendEmail value=email /form On form submission I am passing this value in the body of the mail. Here is the code: cfmail type=html from=fromEmail to=toEmail server=serverName port=25 html head titleLog/title /head body bgcolor=##FF div style=width:100%; height:100%; background-color:##FF; align=center div style=position:relative; left:25px; top:120px; width:690px; height:245px; form id=sendMail table width=100% height=100% cellpadding=0 cellspacing=0 border=0 tr class=label td colspan=2 valign=bottom Comments /td /tr tr td colspan=2 valign=middle textarea id=Comment name=Comment readonly style=width:680px; height:165px; class=input_txt#form.userComment#/xtextarea /td /tr /table /form /div /div /body /html /cfmail Now if I type in the below text in the textarea (userComment) This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is what gets rendered in the email This is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enterBRThis is a test I am just typing it in I am just typing it in and now I hit enter I don't want it to display br's and paragraphs etc. Can someone please show me how to do this. Its doing my heading. Best regards, cfcoder __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
[Reply To] cfmail and textarea formatting issues
I think you could do this: cfset userComment = #ReplaceList(userComment,#Chr(10)#,#Chr(10)##Chr(13)#, BR,P)# You wrote Hello everybody, I have a text area in my form for users to add comments. Seamus CampbellBoldacious WebDesign http://www.boldacious.com[EMAIL PROTECTED] ph 02 6297 4883mob 0410 609 267 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: cfmail and textarea formatting issues
Why are you rendering the results inside the email in a textarea?A standard textarea doesn't have the ability to render HTML. Remove the textarea from the cfmail and it'll work fine. Also, you shouldn't be getting BR and P tags at all because I don't see where you are converting the return chars to those tags... did you leave that part out? Finally, why are you ending the textarea tag with /xtextarea?That shouldn't work at all :) - Rick cf coder wrote: Hello everybody, I have a text area in my form for users to add comments. form name=frm action="" method=post textarea name=userComment/xtextarea input type=submit name=sendEmail value=email /form On form submission I am passing this value in the body of the mail. Here is the code: cfmail type=html from=fromEmail to=toEmail server=serverName port=25 html head titleLog/title /head body bgcolor=##FF div style=width:100%; height:100%; background-color:##FF; align=center div style=position:relative; left:25px; top:120px; width:690px; height:245px; form id=sendMail table width=100% height=100% cellpadding=0 cellspacing=0 border=0 tr class=label td colspan=2 valign=bottom Comments /td /tr tr td colspan=2 valign=middle textarea id=Comment name=Comment readonly style=width:680px; height:165px; class=input_txt#form.userComment#/xtextarea /td /tr /table /form /div /div /body /html /cfmail Now if I type in the below text in the textarea (userComment) This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is what gets rendered in the email This is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enterBRThis is a test I am just typing it in I am just typing it in and now I hit enter I don't want it to display br's and paragraphs etc. Can someone please show me how to do this. Its doing my heading. Best regards, cfcoder __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: cfmail and textarea formatting issues
What version of CF are you on? -Original Message- From: cf coder [mailto:[EMAIL PROTECTED] Sent: woensdag 16 juni 2004 13:30 To: CF-Talk Subject: cfmail and textarea formatting issues Hello everybody, I have a text area in my form for users to add comments. form name=frm action="" method=post textarea name=userComment/xtextarea input type=submit name=sendEmail value=email /form On form submission I am passing this value in the body of the mail. Here is the code: cfmail type=html from=fromEmail to=toEmail server=serverName port=25 html head titleLog/title /head body bgcolor=##FF div style=width:100%; height:100%; background-color:##FF; align=center div style=position:relative; left:25px; top:120px; width:690px; height:245px; form id=sendMail table width=100% height=100% cellpadding=0 cellspacing=0 border=0 tr class=label td colspan=2 valign=bottom Comments /td /tr tr td colspan=2 valign=middle textarea id=Comment name=Comment readonly style=width:680px; height:165px; class=input_txt#form.userComment#/xtextarea /td /tr /table /form /div /div /body /html /cfmail Now if I type in the below text in the textarea (userComment) This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is a test I am just typing it in I am just typing it in and now I hit enter This is what gets rendered in the email This is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enter BRThis is a test I am just typing it in I am just typing it in and now I hit enterBRThis is a test I am just typing it in I am just typing it in and now I hit enter I don't want it to display br's and paragraphs etc. Can someone please show me how to do this. Its doing my heading. Best regards, cfcoder __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: cfmail and textarea formatting issues
yes I'm rendering the text in the email in a text area. I have ColdFusion MX installed on the server. What version of CF are you on? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]