You can try this: ********************* Model.py *********************** db.define_table("Foo", db.Field("foo1", "string", length=32, default=None, requires=IS_NOT_EMPTY()), db.Field("foo2", "string", length=32, default=None, requires=IS_NOT_EMPTY()), db.Field("foo3", "string", length=32, default=None, requires=IS_NOT_EMPTY()) )
******************** Controller.py ************************ # To show only fields "foo1" and "foo2" in the SQLFORM do this: form = SQLFORM(db.Foo, fields=["foo1"., "foo2"]) if form.accepts(request.vars, session): #whatever return dict(form=form) On May 23, 2:02 pm, Elcimar <elci...@gmail.com> wrote: > Sorry my laziness on searching a little more into this forum/ > documentation/web. > > I think I understand the way web2py creates forms from model's tables. > But I didn't figure out yet how to show only a few fields from a > table... Or mix fields from various tables in only one form. Any > advice? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---