[Twisted-web] renderForms layout control and freeform errors

Alexander May alex-news at comcast.net
Tue Nov 9 20:20:39 MST 2004

Shoot, how did I miss that? I looked at every other form example!  Thanks
and sorry the static.



-----Original Message-----
From: twisted-web-bounces at twistedmatrix.com
[mailto:twisted-web-bounces at twistedmatrix.com] On Behalf Of Valentino
Sent: Tuesday, November 09, 2004 6:11 PM
To: Discussion of twisted.web, Nevow,and Woven
Subject: Re: [Twisted-web] renderForms layout control and freeform errors

On Tue, 9 Nov 2004 17:31:55 -0500, Alexander May <alex-news at comcast.net>
> 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/

Twisted-web mailing list
Twisted-web at twistedmatrix.com

More information about the Twisted-web mailing list