Gossamer Forum
Home : Products : DBMan : Installation :

Carriage return...for 4x40 text

Quote Reply
Carriage return...for 4x40 text
I have a description text box that's 4 rows x 40 columns, I also set wrap="virtual". It works fine, but when the record was added or the search results are displayed it does not have a carriage return. It displays as one long line in the results and it really screws my result pages up. Anyone have any ideas? I used: <TR><TD VALIGN=TOP><P ALIGN=RIGHT>
<B><FONT>Description:</FONT></B></TD>
<TD VALIGN=TOP><P> <TEXTAREA NAME="Description" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="500">$rec{'Description'}</TEXTAREA></TD></TR>
Any help would be great.
Mike
Quote Reply
Re: Carriage return...for 4x40 text In reply to
In your html.pl file, you have to add in the following codes:

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

to the top of the following sub-routines:

sub html_record
sub html_record_long (*)

(*) if you are using the short/long display mod.

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 26, 1999).]
Quote Reply
Re: Carriage return...for 4x40 text In reply to
That didn't work either. I think I found a bug by accident. I was testing my description area by just holding down one key for about three rows. I guess it can't force a break when you have a continuous line of characters. This isn't important but it can sure fry the output forms! Also is there a way to initialize the ID counter again? After deleting db entries manually in the default.db it wont return to 1 for the ID count. Thanks again for the help.
Mike
Quote Reply
Re: Carriage return...for 4x40 text In reply to
Well, you can also try to add "physical" to the wrap command. So, it should look like:

Code:
wrap=physical/virtual

But you still need to use the codes I gave you to put line breaks into the search results and add confirmation screen.

You can reset the count by editing the default.count file. Set that file to 0 if you are starting over. Set it to the totally number of records in your default.db file if you want the numbers to be added on to the last record number.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us