[web2py] Re: Hide a form field in view

2014-08-04 Thread desta
Hi Anthony, So you mean that 'dynamic_field' wont be an actual field of the form? On Sunday, August 3, 2014 11:59:18 AM UTC+3, Anthony wrote: > > Haven't tried it, but maybe add the value to form.vars via an onvalidation > function: > > def add_dynamic_value(form): > form.vars.dynamic_field

[web2py] Re: Hide a form field in view

2014-08-03 Thread Anthony
Haven't tried it, but maybe add the value to form.vars via an onvalidation function: def add_dynamic_value(form): form.vars.dynamic_field = [value calculated from existing form.vars] form = SQLFORM(db.mytable).process(onvalidation=add_dynamic_value) Anthony On Sunday, August 3, 2014 1:28:4

[web2py] Re: Hide a form field in view

2014-08-03 Thread desta
I don't think I can use it because 'show_if' still happens in the controller. On Sunday, August 3, 2014 4:03:59 AM UTC+3, 黄祥 wrote: > > perhaps you can use, show_if. > > ref: > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#Conditional-fields > > best regards, > stifan > --

[web2py] Re: Hide a form field in view

2014-08-02 Thread 黄祥
perhaps you can use, show_if. ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Conditional-fields best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we