Re: [web2py] Re: Update on multiple tables with one form

2013-01-29 Thread Annet
Hi Angelo, I am glad you solved your problem. I found a way to add automatically variables to form.vars, hope this helps! > > record = db(...).select().first() > > for table in [db.table1, db.table2]: > for field in table.fields: > form.vars[field] = record[table][fiel

Re: [web2py] Re: Update on multiple tables with one form

2013-01-29 Thread Angelo Compagnucci
To Massimo, I think this should be in the book after this http://web2py.com/books/default/chapter/29/07#One-form-for-multiple-tables Thanks! 2013/1/29 Angelo Compagnucci > Hi Annet! > > This is freaking awesome and it worked like a charm! > > I found a way to add automatically variables to fo

Re: [web2py] Re: Update on multiple tables with one form

2013-01-29 Thread Angelo Compagnucci
Hi Annet! This is freaking awesome and it worked like a charm! I found a way to add automatically variables to form.vars, hope this helps! record = db(...).select().first() for table in [db.table1, db.table2]: for field in table.fields: form.vars[field] = record[tabl