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, ],) when I try to add: if request.args[-3] == 'edit': db.product.price.writable=False I get an error <type 'exceptions.IndexError'> list index out of range That traces to the if statement. however is I load the grid form, and then apply the change and save, the statement works as expected. I also tried adding: else: pass but it doesn't help. what am I doing wrong or not doing? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.