Model:
Field('text1', type='text', length=1000, notnull=True)
Function:
def textinput():
f=SQLFORM(db.example, fields=['text1'])
if f.accepts(request.vars, session):
return dict(form=f)
I want to be able to display the 'text1' field with proper line spacing/formatting. If a user was to press the [enter] key in the form to start a new line or whole new paragraph, I want this to reflect on the view.
For example, if a user enters the following into a SQLFORM:
This is a paragraph. Blah blah blah blah blah blah blah.
Blah blah blah blah blah blah blah blah blah.
Blah blah blah blah.
This is another paragraph. Blah blah blah blah blah.
Blah blah blah blah blah.
I want it to come out exactly like that in the view, instead of having it all crammed up with no spacing. How would I go about doing this? I was thinking about using the .replace method and replacing all [enter] keystrokes with a line break, but I'm not sure how to do it. I've searched all over Google but I can't find my exact issue.
Any help would be greatly appreciated. Thanks.