[Twisted-web] renderForms layout control and freeform errors

Valentino Volonghi dialtone at gmail.com
Tue Nov 9 16:11:13 MST 2004


On Tue, 9 Nov 2004 17:31:55 -0500, Alexander May <alex-news at comcast.net> wrote:
> 1) How do I control the layout of a form rendered via webform.renderForms?
> 
> (http://www.livejournal.com/users/fzzzy/ seems to indicate it's possible:
> 'formless.webform.renderForms() can now be provided with pattern nodes to
> influence the rendering of the forms. The structure and layout of the forms
> can be completely controlled')
> 
> 2) If I use a disk template based form, what fields do I need to add so that
> formless will correctly post error messages.  (or some alternative way to
> post back the error messages)

There is a very complete example of patterning webForms in nevow
distribution under the name customform.tac.

If you need to change the error message (since the position in which
it should be displayed could be specified in the patterned template)
you can do that directly from the TypedInterface:
annotate.String(required=True, requiredFailMessage="Insert that string")

-- 
Valentino Volonghi aka Dialtone
Now running FreeBSD 5.3-beta6
Blog: http://vvolonghi.blogspot.com
Home Page: http://xoomer.virgilio.it/dialtone/



More information about the Twisted-web mailing list