Gossamer Forum
Home : Products : DBMan : Installation :

"tabs" in input fields

Quote Reply
"tabs" in input fields
Hi. There seem to be tabs already in some of my input fields (seems to be textarea fields) when I go to add a record, which causes the output to look funny. Any idea what I can do about this?

Also, I used the code you provided to someone else to allow wrapping when the ENTER key is pressed during data entry, and then print it properly from html.pl. However, the code <BR> shows up in the field when I go to modify a record. Is this supposed to happen? Can I get rid of it?

Thanks,
KimL
Quote Reply
Re: "tabs" in input fields In reply to
Hi, Kim!

Glad to see that you are sticking with DBMAN.
I would love to see the final product! Let me know when it is available for public viewing, okay??

Anyway, the <BR> should not show up in the modify form. You can use the following codes to clean up the views in your textboxes:

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

OR if you only have a variable defined and not a field, you can use the following:

Code:
$descrip =~ s/\n/<BR>/g;

Place these codes before the following line:

Code:
my (%rec) = @_;

in your html_record sub-routine.

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 August 25, 1999).]
Quote Reply
Re: "tabs" in input fields In reply to
Kim, I would need to see your html.pl file to be able to give you specific help on what's going on.

Please copy your html.pl file to a web-accessible directory -- one where you would place html files -- and rename it to html_pl.txt. Then come back here and let me know where it is. I'll take a look.


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





Quote Reply
Re: "tabs" in input fields In reply to
Hi, JPDeni. The file is at www.evms.edu/test/html_pl.txt .

Hi, Eliot. It's getting there Smile I'll be happy to let you see it when it's done.

Do you mean put that code instead of, or in addition to, what I already have (I haven't done this yet)?

Code:
foreach $column (@db_cols) {
$rec{$column} =~ s/\n/<BR>/g;
}

Thanks,
KimL

[This message has been edited by kiml (edited August 26, 1999).]
Quote Reply
Re: "tabs" in input fields In reply to
You need to take out the

Code:
foreach $column (@db_cols) {
$rec{$column} =~ s/\n/<BR>/g;
}

from sub html_record_form. This is only for sub html_record.

With your textarea definitions, you need to have everything on one line.

Instead of

Code:
<TEXTAREA NAME="clinical_interests" ROWS="4" COLS="50" WRAP="VIRTUAL" MAXLENGTH="255">
$rec{'clinical_interests'}</TEXTAREA>

use

Code:
<TEXTAREA NAME="clinical_interests" ROWS="4" COLS="50" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'clinical_interests'}</TEXTAREA>

Everything between MAXLENGTH="255"> and </TEXTAREA> will go into your textarea, including linefeeds and spaces.


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