On Thu, Apr 24, 2008 at 1:22 PM, Cecil Westerhof <[EMAIL PROTECTED]> wrote:
> 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?

Form is part of html so you can find all the info on it on google.
As far as form and turbogears you could probobly use a form and pass
it to turbogears,
http://lucasmanual.com/mywiki/TurboGears#head-7f36bfd19f9cbcfc9c03f7e472052232e14dd795
but it is easier to just use widgets to create forms and use
validation that comes with turbogears.


Lucas

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