Gossamer Forum
Home : Products : DBMan : Customization :

How do I enter an address as a field?

Quote Reply
How do I enter an address as a field?
When I try to enter the address in a field, the display of the record shows the address to be just one long line of text, and the different lines of the address with just a space between them. I need to enter an address in a field that will display like so:

Universidad Nacional Autonoma de Mexico
Dirección General de Información
11º piso, Torre de la Rectoría
México 20, D.F., MEXICO

Of course when I left returns at the end of each address line (for example, when I created a text file to be read by the database, rather than create records by entering them through the database) each line was taken as a separate record because of that return. Can anyone help?

puffer@ccwf.cc.utexas.edu
Quote Reply
Re: How do I enter an address as a field? In reply to
You are entering your address in a textarea field? If so, in html_record, just after

my (%rec) = @_;

add

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

Substitute the correct name of the field for "Address" above. Have one of those lines for each record that might have carriage returns in it.

As you found out, it's better to enter the data through DBMan than to import it from a text file. DBMan converts the carriage returns to other characters when it saves the record and then recoverts them when it reads the record.


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





Quote Reply
Re: How do I enter an address as a field? In reply to
Carol,

Maybe it's time you added a "Snippets" section to that website of yours! Smile

adam
Quote Reply
Re: How do I enter an address as a field? In reply to
This and some of the other things are in the FAQ. But it's just as easy to answer the questions as it is to send people someplace else.


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