thanks. that works albeit a bit esoteric.

On Jun 17, 12:03 am, Anthony <abasta...@gmail.com> wrote:
> Maybe try:
>
> form.vars.id = table.insert(**table._filter_fields(form.vars))
>
> The _filter_fields method should pull out only the dict keys that are fields
> in the table. 
> Seehttp://web2py.com/book/default/chapter/07#One-form-for-multiple-tablesfor
> an example of this.
>
> Anthony
>
>
>
>
>
>
>
> On Thursday, June 16, 2011 6:04:27 PM UTC-4, apple wrote:
> > I get this error when trying to insert a record manually from a
> > sqlform:
>
> > SyntaxError: Field _autocomplete_name_aux does not belong to the table
>
> > Controller line is:
> >       form.vars.id = table.insert(**dict(form.vars))
>
> > Model definition has a field using the autocomplete widget:
>
> > db.define_table('order',
> >         Field('product', db.product,
> >          widget = SQLFORM.widgets.autocomplete(request,
> > db.product.name, id_field=db.product.id)),

Reply via email to