Hello,
I try to find a solutiuon for a hopefully simple problem.
Example:
db.define_table("foobar",
Field("uuid", "string"),
Field("text", "string"),
Field('created_on', "datetime", default=request.now))
def list_order_type():
form = SQLFORM.grid(db.foobar)
return dict(form=form)
I need that in the edit page of the grid the field "text" is readonly if the field "text" is not empty and the "created_on" timestamp id older than an hour.
Where and how can I set the db.foobar.text.writable = False?
I can use request.args(1) = 'edit', but how can I then take the row, test it and set the writable to false?
I don't want to validate after sending the form. The input field should be initially readonly.
Regards,
Mike