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 = []