[Zope] carriage returns and newlines entered into HTML form inputs

Dennis Allison allison@sumeru.stanford.EDU
Wed, 14 May 2003 07:25:06 -0700 (PDT)


The carriage returns are probably there, it's just that you cannot see
them. When you display the information try

<dtml-var mailingaddress newline_to_br>

which will convert the newlines in the text to '<br>' markup, the HTML
equivalent of a carriage return.  

On Wed, 14 May 2003, AdvertisingDept wrote:

> HTML Form contains a textarea inputs. 
> Form submits data to MySQL database.
> 
> User wants to enter distinct 'lines'
> into a textarea input box
> - such as a formatted mailing address.
> 
>      Street Address
>      Suite / routing
>      City, ST zipcode
> 
> They press return at end of each line, 
> and the textarea input box complies 
> formatting the data on their screen.
> 
> However, when I retrieve the data from the SQL database,
> the formatting / carriage returns are gone?
>