SQLFORM adds a hidden "_formname" field, which it expects to be present for 
validation. For SQLFORM.factory, the default value of that field is 
"no_table/create", though .process(), .validate(), and .accepts() take a 
"formname" argument that allows you to specify any name. So, your URL 
should include _formname in the query string:

http://myapp/get_rates?rooms=5&agency=1&_formname=no_table/create

Alternatively, you could add _formname to request.get_vars before 
processing the form:

request.get_vars._formname = 'no_table/create'



>     form = SQLFORM.factory(
>         Field("rooms", "integer", required=True)
>

Note, setting required=True will be irrelevant here, as it is used by the 
DAL, not by the form validation system. If you want validation to enforce a 
required value, use requires=IS_NOT_EMPTY().

Anthony

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