Excellent! je prends le train, direction MTL, a tous les quelques mois pour me rendre au bureau (peut-etre un peu moins souvent l'hiver ;) )
SO, I have a question: Once, I use the button to add a field (which does work well), what should be the expected back-end result? does one of the tables get updated? or should a new table get generated based on input type? How about a Field name? generic one name fits all (or depends on type?) Mart :) On Jan 19, 9:12 am, Richard Vézina <ml.richard.vez...@gmail.com> wrote: > ;-) Originellement oui... > > I would tell you on the orther thread that I post this one... I will do it > just for the one that fall on the orther thread so they could keep track... > > I continue today working on this. > > Richard > > > > > > > > On Wed, Jan 19, 2011 at 12:30 AM, mart <msenecal...@gmail.com> wrote: > > Hey, es-tu de Montreal? > > > On Jan 18, 7:08 pm, Richard Vézina <ml.richard.vez...@gmail.com> > > wrote: > > > I forgot to paste : > > > > def register(): > > > form=SQLFORM.factory(db.client, db.address, formstyle = 'divs') #, > > > table_name='dummy_name') > > > if form.accepts(request.vars): > > > id = db.client.insert(**db.client._filter_fields(form.vars)) > > > form.vars.client=id > > > id = db.address.insert(**db.address._filter_fields(form.vars)) > > > response.flash='Thanks for filling the form' > > > return dict(form=form) > > > > What to do for what in red? > > > > I think _filter_fields is the key of the problem... > > > > I didn't have a look to it actually... > > > > Richard > > > > On Tue, Jan 18, 2011 at 7:00 PM, Richard Vézina < > > ml.richard.vez...@gmail.com > > > > > wrote: > > > > Hello Massimo, > > > > > I am trying to insert data in 2 tables from one form... I would like to > > be > > > > able to insert any number of rows or records in the subtable. > > > > > I build this test app (see attach)... All the work I did is mostly in > > > > /default/register.html where there is jQuery script that allow adding > > new > > > > city input and delete new city input... > > > > > I built it from scratch for Web2py inspired by : > > > >http://charlie.griefer.com/blog/index.cfm/2009/9/17/jQuery--Dynamical. > > .. > > > > > What should I do in register to allow the function to insert all the > > filled > > > > city clone field?? > > > > > Next step will be adapted my script that it manage all the subform > > columns > > > > instead of only one. > > > > > Thanks. > > > > > Richard