Skip to main content
Inspiring
November 13, 2007
Answered

page break after specific legth

  • November 13, 2007
  • 1 reply
  • 326 views
My users are entering responses into to a textarea which is submitted to my database. Then I'm displaying the text using CFPROCESSINGDIRECTIVE suppresswhitespace="no" so the white space is displayed. But now its expanding my table too far when people don't use a return.

Is there a way to put a return in a sentence after a specified length? which would be the length of my table width.

I'm trying to preserve the spacing the user inputs but restrict the sentence length with out a return.

Any help is greatly appreciated
This topic has been closed for replies.
Correct answer Newsgroup_User
preserverwhitespace="no" should have no effect on preserving user's
linebreaks n a text area input.
i am pretty sure that what you are seeing is not the result of users not
using "return" key in their inputs, but a result of you not formatting
the output of their input correctly.

while, to answer your specific question, there are ways to insert html
linebreaks (<br> tags) in the user's input text at display time (using
regexp and loops), i would suggest first trying more common techniques
like using
#paragraphformat(yourtext)#
or even just
<pre>#yourtext#</pre>
(with a bit of css formatting to make it look nice)

hth


---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

1 reply

Newsgroup_UserCorrect answer
Inspiring
November 13, 2007
preserverwhitespace="no" should have no effect on preserving user's
linebreaks n a text area input.
i am pretty sure that what you are seeing is not the result of users not
using "return" key in their inputs, but a result of you not formatting
the output of their input correctly.

while, to answer your specific question, there are ways to insert html
linebreaks (<br> tags) in the user's input text at display time (using
regexp and loops), i would suggest first trying more common techniques
like using
#paragraphformat(yourtext)#
or even just
<pre>#yourtext#</pre>
(with a bit of css formatting to make it look nice)

hth


---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Inspiring
November 13, 2007
Perfect! thank you my head hurts I've been coding too long. Paragraphformat solved my issue. Now I will polish it off with some css, thanks!!