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

-- 
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/d/optout.

Reply via email to