Gossamer Forum
Home : Products : DBMan : Customization :

Line Breaks in Description Field?

Quote Reply
Line Breaks in Description Field?
How can I get the description field to break lines.

I want to be able to break the description field into paragraphs.

tnx!
Quote Reply
Re: Line Breaks in Description Field? In reply to
In html_record, just after

my (%rec) = @_;

add

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




------------------
JPD


Quote Reply
Re: Line Breaks in Description Field? In reply to
That didn't work Frown

I tried:

my (%rec) = @_;
$rec{'Description'} =~ s/\n/<BR>/g;

my (%rec) = @_;$rec{'Description'} =~ s/\n/<BR>/g;

my (%rec) = @_; $rec{'Description'} =~ s/\n/<BR>/g;

... but never got paragraphs. Any idea what I 've done wrong
Quote Reply
Re: Line Breaks in Description Field? In reply to
Is your field named "Description"? I was just assuming it was. Remember that field names are case-sensitive, so that "Description" does not equal "description" or "DESCRIPTION."

I would put it on two different lines, just to make things easier to read.


------------------
JPD


Quote Reply
Re: Line Breaks in Description Field? In reply to
OOPS!

I must of needed to have the page reloaded or whatever, 'cuz it does work

Smile

TNX!
Quote Reply
Re: Line Breaks in Description Field? In reply to
Hello,

I'm just preparing a doctorate on TEXTAREA tags

My suggestion: look at the usage of the wrap parameter in the tag. You could find all informations by downloading the "htmlib.exe" freeware.

With wrap="virtual" for IE 3.0 (or "soft" with IE 4.0 or > and NN 4.0 or > ) the field will retain your formatting.

Cheers,
Germinator
Quote Reply
Re: Line Breaks in Description Field? In reply to
I pasted:
$rec{'Description'} =~ s/\n/<BR>/g;
After:
my (%rec) = @_;

In sub html_record on in the html.pl page and it did not seem to work. Am I adding this to the wrong page, the wrong area in the page, or both?
Quote Reply
Re: Line Breaks in Description Field? In reply to
Can I take a look at your database? I'd need to be able to have "add" permission. (I'll delete anything I add.) If you'd rather not post the URL to your database here, you can send it to me at deni@jpdeni.com and I'll take a look at it.


------------------
JPD