On Tuesday, November 15, 2016 at 9:58:52 AM UTC-8, Ramos wrote:
>
> I know this should be a simple one.
>
> I have a field
> Field('event','text',requires=IS_NOT_EMPTY(error_message=T("Please
> enter a value")),label=T("Event")),
>
> This field is displayed as a textarea.
>
> The user inputs text like this
>
> aaa
> bbb
>
>
> ccc
>
>
> and when i show it on a form as
> <p>{{=event}}</p>
>
> i get ...
>
> aaa bbb ccc
>
> Where is the "thing"??
>
The newlines? This came up recently (and I answered wrong). You're
rendering the input text as HTML, which treats whitespace as word
separators.
You can use a helper, either a PRE or Marlysson's XML suggestion.
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.