[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-24 Thread Massimo Di Pierro
You cannot make a field not writable conditionally. Because if the field is writable it shows in the form. This is before you know the value of the other field. Conditionally you can remove the field from form.post_vars. On Monday, 23 June 2014 12:26:04 UTC-5, 98u...@gmail.com wrote: > > I did

[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-23 Thread 98ujko9
I did what you suggested but the calls to: db.owner.own_end_date.writable = False # not writable db.owner.own_end_date.readable = False # do not show is at all! are effective only if executed before the call to form = SQLFORM.smartgrid(db.owner, ... When executed after, have no effect. I want to

[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-23 Thread Massimo Di Pierro
That s what readonly means. readonly is an HTML attribute and has nothing to do with form processing. If you do not want them to appear in forms you have to tell the model: db.owner.own_end_date.writable = False # not writable db.owner.own_end_date.readable = False # do not show is at all! Mass