Perhaps the standard trick still helps? I did not try it. db.table1.field1.readable=db.table1.field1.writable=False db.table2.field2.readable=db.table2.field2.writable=False
On Sep6, 10:50am, weheh <[email protected]> wrote: > Thanks for the quick response, Massimo. I'll try it out. However, > could you also show the syntax of how I can selectively pull out > fields from the different tables in the SQLFORM.factory? In other > words, assum there are no table naming conflicts between the two > tables but I don't want to use all the fields from either table1 or > table2. How would I pull just the fields I want and populate the form > with them? > > On Sep 5, 10:24 pm, mdipierro <[email protected]> wrote: > > > > > say you have db.table1 and db.table2 > > > You should be able to do something like > > > form=SQLFORM.factory(db.table1,db.table2) > > if form.accepts(request.vars): > > db.table1.insert(**dict(form.vars)) > > db.table2.insert(**dict(form.vars)) > > > assuming the two tables have no field naming conflit. I did not try > > it, let us know if it works. > > > On Sep 5, 9:16 pm, weheh <[email protected]> wrote: > > > > Actually, I guess there's a question as to whether I can even do this > > > with SQLFORM or if I need to go to SQLFORM.formfactory and do all the > > > db inserts explicitly thereafter?- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

