[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-25 Thread Paolo Valleri
To fix the exception 'table already defined' use define_table() with redefine=True see http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=redefine#redefine Paolo On Wednesday, March 25, 2015 at 2:17:45 AM UTC+1, Ramkrishan Bhatt wrote: > > I am looking from

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-24 Thread Ramkrishan Bhatt
I am looking from templating genrated form through SQLFORM.factory is possible that we can clone of address table Multiple time like one person can have multiple address using add address button. Than submit all together with bulk insert. -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-23 Thread Val K
I think, there is no problem, but I am not sure that I understand what you want: - do you want to edit/insert multiple records of/to the same table (person-address-relation for example) at once, per single form's accept? - do you want to edit/insert single records of/to few tables at once? or d

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-06 Thread Ramkrishan Bhatt
No Solution for one to many composite form ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the G

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-05 Thread Ramkrishan Bhatt
table already defined: address Anyway i guess you are not understanding requirement :- SQLFORM.factory(table1,table2,table3) if form.process().accepted: do something. Now we want like we can add extra add table2 form in dynamically. like in view composit form of table1 table2 (op

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-04 Thread 黄祥
perhaps you can create an address table and use list:reference in sqlform.factory e.g. (not tested) db.define_table('address', Field('address') ) def form_from_factory(): form = SQLFORM.factory( Field('address', *'list:reference', requires = IS_IN_DB(db, db.address.id, '%(address)s'