On Sep 13, 10:54 am, Straphka <[EMAIL PROTECTED]> wrote:
> Ok, here is the problem.
> I have found some similar problems on this group, but couldn't quite
> apply the solutions given there to my (probably very basic) problem.
>
> I have a list of widgets:
> LinkForm = widgets.TableForm(
>     fields = [
>         widgets.HiddenField('linkid'),
>         widgets.TextField('title_en', label='English title'),
>         widgets.TextField('title_nl', label='Dutch title'),
>         widgets.SingleSelectField('catid', label='Catagory',
> options=[('','')]),
>     ],
>     validator=LinkSchema(),
>     )
>
> ok, cool, I can use that.
> Now I want to pass data to it before display:
> data = dict(
>     linkid = link.id,
>     title_en = link.title_en,
>     title_nl = link.title_nl,
>     catid={'options': [(1,1)]},
>     )
>
> And I render it (using genshi) with:
> ${ET(form.display(data, action='/action')}
>
> Ok, everything works except for the options part. Obviously [(1,1)] is
> only for demonstration.
>
> Please bear with me, I am pretty new to turbogears:)

Ok, I am a moron.
This question is no longer relevant. I solved it by using a callable
for options


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to