Yup, that fixed it.  Thanks!

On Mar 26, 5:26 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> use
>
> if form.accepts(formvars,dbio=False,formname-None)
>
> else iit expects a formname key in the formvars.
>
> On Mar 26, 3:36 pm, Lennon <lpru...@hotmail.com> wrote:
>
>
>
>
>
>
>
> > I was under the impression that you could pass your own dictionary to
> > form.accepts but in the code below it neither accepts correct values
> > nor returns any errors with incorrect ones.  Am I mistaken about being
> > able to do this or am I doing something wrong with my approach?
> > Thanks for any help.
>
> > fields = ['gender', 'firstname']
>
> > form = SQLFORM(db.person,fields=fields)
>
> > formvars = {'gender' : '' , 'firstname' : '')
>
> > if form.accepts(formvars,dbio=False):
> >     return True
> > else:
> >     print form.errors
>
> > This code returns <Storage {}> regardless of what I put for the values
> > of gender and firstname.

Reply via email to