Thanks

I was doing

form.accepts(request, session, dbio=False...)

before

form.vars.name = request.post_vars.name

Whe should be after.



On Tue, Jan 20, 2015 at 3:24 PM, Nbush <[email protected]> wrote:
> Use default:
>
> db.person.name.default="MAbeeTT"
> form = SQLFORM(db.person)
> ...
>
> вторник, 20 января 2015 г., 1:47:19 UTC+3 пользователь Matt Bee написал:
>>
>> I am making some functions which presents SQLFORMS, and I need the forms
>> with prefilled fields, the info for the fields is generated from some ad-hoc
>> python functions.
>>
>> The app workflow is similar to this:
>>
>> * The user puts a server information, if the server offers the validated
>> services a new server entry is created via SQLFORM (some fields are
>> generated by the user as 'name', 'room', etc.
>>
>> * The user selects an active server, so the system search for services,
>> the user selects a service and adds it, so the services is associated to the
>> server entry.
>>
>> I need some fields to be prefilled, ex: a service name, but not as hidden
>> field, since I the user should be able to change it.
>>
>> Is there some way to prefill some fields _values?
>>
>> I do not know how to do it. I searched in the documentation, with no
>> results, maybe because I am new with python & web2py.
>>
>>
>> Thanks
>>
>>
>>
>>
>> --
>>              .::MAbeeTT::.
>>
>>  mabeett [at] gmail [ dot] com
>
> --
> 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.



-- 
             .::MAbeeTT::.

 mabeett [at] gmail [ dot] com

-- 
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.

Reply via email to