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
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,
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
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?
4 matches
Mail list logo