Skip to main content
Inspiring
February 19, 2010
Question

Embedded carriage return

  • February 19, 2010
  • 1 reply
  • 1569 views

We have  an application with a textarea that is used for comments, free form text. It seems that if the user enters a line of text, then uses the enter key to go to the next line, it captures the carriage return. When the form is brought up for review, it is completely empty, yet all the data that was entered is in the table.

If the textarea is entered without using the enter key, the data displays when the form is reviewed.

I have never encountered this problem before and tried it and it does indeed do what is described above. I entered the textarea without using the enter key and the data displays. I went back to edit and added the enter key to the textarea and the form is completely blank.

What is going on and how can I prevent this from happening ?

This topic has been closed for replies.

1 reply

Inspiring
February 19, 2010

Sounds like a display problem.  Where are you trying to display it?

trojnfnAuthor
Inspiring
February 19, 2010

It is just being displayed in another form, just using <cfinput type="text" name="field1" value="#qry.field1#">, etc. for the other fields and <textarea>#qry.textarea#</textarea> for the text area. The <cfoutput> tag is included, yet the entire form is blank.

Inspiring
February 19, 2010

Try these things, in this order.  See when it stops working.

<cfdump var="#query.textarea[rownumber]#"

<pre>

<cfoutput query="yourquery">

#textarea#

<hr>

closing tags.

<form>

<cfoutput>

<textarea>#query.textarea[rownumber]#</textarea>

</form>