On Aug 4, 2006, at 12:40 PM, Joseph Wenninger wrote:
>
> Hi !
>
> Currently I'm a littlebit lost with CompoundFormFields and
> parameters for
> members.
>
> I've created a generic CompoundFormField derived class, which
> contains some
> text fields and check boxes. I'd like to to use my custom form
> field at
> various places, so I'd like to add parameters for the sub fields in
> the
> constructor of my field in a widgetlist.
> Is this really not possible or am I missing something ? Some time
> ago I had
> hacked something together, but I would like a clean solution better.
>
> Probably I'm missing something.
>
> Something like:
> class NetworkBasicsFields(widgets.WidgetsList):
> myfield=MyCompoundField(label="some label", subwidget_parameters=
> {'widget_1':
> {'default':'ABC'},'widget_2':{'default':200}})
> myfield2=MyCompoundField(label="some other label",
> subwidget_parameters={'widget_1':{'default':XYZ'},'widget_2':
> {'default':100}})
> ...
I've posted a demo widget at the wiki [1] to answer your question.
Hmmm, well, sort of: The demo uses a plain CompoundWidget not a
CompoundFormField... Be posting an updated demo soon.
HTH,
Alberto
[1] http://trac.turbogears.org/turbogears/wiki/CompoundWidgets
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---