On Wed, Jun 23, 2010 at 08:40:33AM -0700, Ben Bangert wrote: > On Jun 23, 2010, at 3:22 AM, Marius Gedminas wrote: > > Skipping htmlfill on the initial form presentation implies that you > > can't <form:error> in your form code, unless you don't mind invalid > > HTML. > > Using a Mako def as a filter function for the HTML form on the page > means that htmlfill runs on every display of the form. I.e. I'm using > it like this: > <%def name="client_form()" filter="widget.formfill">
My point was that the if statement inside your formfill filter skips
htmlfill.render on the initial form presentation (i.e. request.params
being empty and there being no form errors to display):
> <%def name="formfill(content)">
> <% errors = c.form_errors or {} %>
> % if not errors and not request.params:
> ${content |n}
Marius Gedminas
--
To err is human, but to really foul things up requires a computer.
signature.asc
Description: Digital signature
