On Thursday, March 10, 2011 11:23:43 AM UTC-5, Eduardo wrote: > > OK, let's try SQLFORM.factory without diverting from my original > purpose: if I use SQLFORM.factory to generate the form, should I use > the following to make the inserts? > > form = SQLFORM.factory(....) # Field( )s go here > if form.accepts(request.vars): > db.table.insert(**db.table._filter_fields(form.vars))
I haven't tried it, but that's exactly what the book says. I think _filter_fields filters the form.vars to only include fields that are actually in the table. Anthony