[Zope3-Users] formlib widget

FB fbo2 at gmx.net
Wed Nov 29 16:01:15 EST 2006


Hi,

On Wed, Nov 29, 2006 at 06:37:53PM +0100, Dennis Schulz wrote:
> Hi,
> 
> in a formlib based form I would like to have more control over the rendering of the widgets.
> is it possible to call widget with a specific name directly instead of running through all on a repeat 
> loop?
> for example
> 
>  <div tal:define="name string:1;
>                  w1 view/widgets.get(name)" >
> 
> I saw that there is a get method but I can't access it form the page template.

The w1-assignment won't work because you mixed a path and a python expression.
Use tal:define="w1 view.widgets.get('1')" .

I wrote a small "Framework" to make template based formlib forms easier. Have a look
at fb.fields ( svn at http://fbo.no-ip.org/svn/fbo/fb ). Unfortunately it's not well
documented, yet.

fb.test is a simple demonstration object using a slighty more powerfull
edit/addform than the one provided by fb.fields. It uses
fb.i18n.browser.(I18NEditForm|I18NAddForm) instead of
fb.fields.browser.(EditForm|AddForm) .

Regards,

Frank


More information about the Zope3-users mailing list