Re: [web2py] Re: SQLFORM.factory without a database table

2014-02-18 Thread Marty McCasland
Was aiming to create a grid. Just used an in-memory SQLite db to achieve the grid. Works great. Sent from my iPad > On Feb 18, 2014, at 3:14 PM, Richard Vézina > wrote: > > Don't understand your question... It generate a self validating form base on > field validator defined in models if

Re: [web2py] Re: SQLFORM.factory without a database table

2014-02-18 Thread Richard Vézina
Don't understand your question... It generate a self validating form base on field validator defined in models if you clone you field from there or the Field() if you create field input on the fly... Do you want a form? or a Grid? If the latter there the TABLE() helper... Richard On Tue, Feb

[web2py] Re: SQLFORM.factory without a database table

2014-02-18 Thread Dave S
On Thursday, February 13, 2014 9:03:33 PM UTC-8, A36_Marty wrote: > > I would like to make a grid-like screen without an underlying database > table. > > is this something interactive, where the user is entering data? Or is it just a display? If the latter, perhaps you just want the TABLE hel

Re: [web2py] Re: SQLFORM.factory without a database table

2014-02-14 Thread Richard Vézina
To insert/update record with .factory() you can do something like that : if form.process().accepted: if condition when update mode is not meat: id = db.underlying_table.insert(field1=form.vars.field1, ...) # You keep the id in cas you need it to insert some information in another tabl

[web2py] Re: SQLFORM.factory without a database table

2014-02-14 Thread Anthony
SQLFORM.factory is for generating forms, not grids. The grid requires an actual database, though you can use a SQLite memory database: https://groups.google.com/d/msg/web2py/g4Mon6PvNFc/jytHfEnOXTIJ. Anthony On Friday, February 14, 2014 12:03:33 AM UTC-5, A36_Marty wrote: > > I would like to ma