it's to hold selected lines, I think. Anyway, you should use
request.get_vars to get your data (since your method is "get"). Also,
please note that the grid is coded in such a way that the grid is the sole
"manager" of the request/response cycle, so fiddling in the same page with
your own pieces of code may result in issues.
On Monday, September 12, 2016 at 8:37:13 AM UTC+2, Yibing Liu wrote:
>
>
> My web2py version is 2.14.6.
>
> I define a form in myview.html
>
> `<form action="{{=URL('default','sj_xxxx')}}" method='get'>
> <input id='shizhou' name='shizhou'>
> <input id='xianqu' name='xianqu'>
> <input id='xiangzhen' name='xiangzhen'>
> <input type="submit" value="query">
> </form>`
>
> In my default controler function 'index' I want to deal with the
> request.vars passed from html.It works fine. Then I add a
> form=SQLFORM.grid(query) to my function, I find that the request.vars are
> added an additional key "records" with null value when the sqlform.grid()
> line is executed. So I debug into the source code, I find the line 2479 in
> sqlhtml.py is
>
> elif not request.vars.records: request.vars.records = []
>
> After the above line excuted my request.vars was added an additional
> key "records" with null value. My questions are,
>
> 1.How can I prevent adding the "record" key to my request.vars?
>
> 2.What's the purpose of the code
>
> elif not request.vars.records: request.vars.records = []
>
--
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.