Skip to main content
Known Participant
September 25, 2008
Question

Cold Fusion and HTML

  • September 25, 2008
  • 2 replies
  • 619 views
There is a form which accepts user data. There is a textarea included in the form. The problem is when i display that information in a html form it doesnot display the text in the format in which it is entered in the textarea example linebreaks, newlines etc.


I am facing the same problem sending this text throuh <cfmail>. it also does not display special characters.


how can i resolve this issue?
This topic has been closed for replies.

2 replies

Inspiring
September 25, 2008
Dan Bracuk wrote:
> To display line breaks in html, replace chr(10) & chr(13) with <br>

Or output the form data inside of html <pre>...</pre> tag that do
understand carriage returns and line breaks aka chr(10) & chr(13)
sachin_tdAuthor
Known Participant
September 26, 2008
i used <pre></pre>. it worked fine but now what should i do if i want to wrap the text also. since usage of <pre> has destorted my pages.
Inspiring
September 26, 2008
Hi,

Try the ParagraphFormat function.
Inspiring
September 25, 2008
To display line breaks in html, replace chr(10) & chr(13) with <br>

For mail, if you send as plain text, you don't have to do anything.