Web2py doesn't have this feature natively, yet. I'm working on some workaround, but it's not finished.
On Wed, Jul 17, 2013 at 3:14 AM, Andrey Oleynik <[email protected]> wrote: > Hi! > > I want to submit more than one record to a table from the form. > > e.g. i have the following tables in the db: > > db.define_table('book', > > Field('title')) > > db.define_table('author', > > Field('name') > Field('book', 'reference book')) > > > and function: > > def submit(): > form=SQLFORM.factory(db.book,db.author) > if form.process().accepted: > id = db.book.insert(**db.book._filter_fields(form.vars)) > form.vars.book=id > id = db.author.insert(**db.author._filter_fields(form.vars)) > response.flash='Thanks for filling the form' > > return dict(form=form) > > As result of submitting this form I gets by one record in each tables. > How could I add more than one author of the book from the form without > adding the authors in advance? > > Thanks > > -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

