[web2py] SQLFORM.grid edit form pre populate field

2013-12-06 Thread Ivo
Does anyone know how to pre populate a field when using the SQLFORM.grid edit function? I know that for a new record you can use: if request.args[-3] == edit: db.table.field.default = 'foo' but if the field already contains a value it gets ignored. so I tried: value = auth.user.value if

[web2py] SQLFORM.grid edit form restrictions

2013-12-03 Thread Ivo
Hi, I have want to set some restrictions on editable fields in a edit form grid. This is the form def product(): grid = SQLFORM.grid(db.product, columns=[ db.product.name, db.product.description, db.product.price,

Re: [web2py] SQLFORM.grid edit form

2012-05-01 Thread Jim Steil
I see a couple ways to handle it. 1. Using a custom view, wrap the button html with an if statement testing to see if request.args(1) == 'edit'. If so, then you are in the edit form for the grid. 2. Specify a custom view based on request.args(1) == 'edit' and then code the entire thing using

[web2py] SQLFORM.grid edit form

2012-04-30 Thread Keith Edmunds
I have a SQLFORM.grid, and I want to add a button to the form used to edit records (as called from the grid). Is that possible? -- You can have everything in life you want if you help enough other people get what they want - Zig Ziglar. Who did you help today?