[Twisted-web] freeform: Getting default field values for autocallable methods

Chris Armstrong twisted-web@twistedmatrix.com
Thu, 1 Jan 2004 12:17:06 -0500


On Thu, Jan 01, 2004 at 05:15:42PM +0200, Gavrie Philipson wrote:
> Hi,
> 
> When defining a form with attributes that are handled by freeform, the 
> default values of the form are automatically filled in with the current 
> values of the attributes.
> 
> However, when using an autocallable method which takes parameters, there 
> seems to be no way to supply default values for the fields.

fd = freeform.IFormDefaults(ctx.locate(IRequest).getSession())
fd.setDefault('setData.pageData', 'default text')

where setData is the autocallable's name, and pageData is the parameter.


-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+            http://radix.twistedmatrix.com