Gossamer Forum
Home : Products : DBMan : Installation :

Line Feeds in Text Area

Quote Reply
Line Feeds in Text Area
Hi all,

Hopefully a quickie. I am trying to set up a script to act as a simple system where I can add news items to a page. I have tried several scripts but DBMan seems to be closest to what I want with some tweaking.

One problem though: If I use a text area and type in some text, including new paragraphs, the text just gets shoved into one paragraph rather than keeping the format I used to enter it. Is there a way round this?

Cheers,

Tony

Quote Reply
Re: Line Feeds in Text Area In reply to
From the FAQ in the Resource Center:

Code:
In sub html_record, after

my (%rec) = @_;

add

$rec{'FieldName'} =~ s/\n/<BR>/g;

Substitute the actual name of your field for "FieldName."
Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Line Feeds in Text Area In reply to
Thanks for that, it serpently did the trick :)