If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

Dear all,

Anyone know how to fix problem when use SQLFORM.grid search box in LOAD function.


This are steps to reproduce the problem?

Step 0
# in models/db.py
                Field('code', length = '50', notnull = True, unique = True),
                Field('name',  notnull = True),
Step 1
#in controller/default.py
def test_sqlform():
    return dict()
def sqlform_grid():
    return sqlform_grid
# in view => /views/default/ test_sqlform.html
{{extend 'layout.html'}}
{{=LOAD('default', 'sqlform_grid', ajax=True)}}
Step 2
2.0 open =>
2.1 try to search some product let say = 'glass' 
2.2 go to 2nd page and search again = 'dish'
2.3 in the search box you will see ['glass', 'dish']
2.4 clear and search again does not help
2.5 press search button you will get ['glass', ['glass', 'dish'[] (something like this)
I using web2py version is 2.9.5 - 2.9.8
Any recommend, what I do wrong? 
Thank you in advance.


Answers (0)

Comments (0)

Related content

Hosting graciously provided by:
Python Anywhere