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:46 AM UTC+2, desta wrote:
>
> Is it possible, when creating a form with SQLFORM to set a field as hidden?
>
> In my application I have a form which one of its fields, has to be
> completed automatically i.e. not by the user. The problem is that the data
> that goes into that field is dynamic (depends on the actions of the user)
> and it is not known when the form is constructed in the controller. That
> means that the field has to be in the html and hidden. *readable=False*
> and *writable=False* don't work in this case.
>
> Any suggestions?
>
> Thank you.
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.