When using {{=form}} in views, I want to customize the output so it's
more tabular. Right now, the output all just flows on one line.
Example controller:
def form1():
form = FORM('Name: ', INPUT(_name='name', value=session.name),
'To Address: ', INPUT(_name='to_address', requires=IS_EMAIL
()),
INPUT(_type='submit'))
return dict(form=form)
View code:
{{=form}}
Outputs HTML:
<form action="" enctype="multipart/form-data" method="post">Name:
<input name="name" value="Me" type="text">To Address: <input
name="to_address" type="text"><input type="submit"><div
style="display: none;" class="hidden"><input name="_formkey"
value="c15bd62a-fe17-4e3b-a372-aac92f154001" type="hidden"><input
name="_formname" value="default" type="hidden"></div></form>
So I'd like something like this with the benefits of Validation errors
and so forth with line breaks:
<form action="" method="post">
Name: <input name="name" value="Me" type="text"><br>
To Address: <input name="to_address" type="text"><br>
<input type="submit">
</form>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.