2008/4/24, Christoph Zwerschke <[EMAIL PROTECTED]>:
>
>
> Cecil Westerhof schrieb:
> > I know have: ...
>
> >     ${form(value = authorID, action = 'save', submit_text = "Create")}
>
>
> You should set value = dict(authorID=authorID). The value for a form
> must be a dict, because the form usually has more than one field.



That was one of the things I was wondering: how to set severall values. ;-}

It works now.
I have:
     @expose(template='kid:tblog.BlogEntryController.templates.form')
    def new(self, **kw):
        return dict(modelname  = self.modelname,
                    formValues = dict(authorID = identity.current.user.id),
                    form       = model_form,
                    page       ='new')
and
    authorID   = widgets.HiddenField()
and
    ${form(value = formValues, action = 'save', submit_text = "Create")}


And now it works as it should work.

Where can I find documentation about the form function?

-- 
Cecil Westerhof

--~--~---------~--~----~------------~-------~--~----~
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