The workaround of the hidden fields seems to be much more complex for this
simple issue, isn't it?
In this specific case, we make a search in my point of view the most
appropriate action should be a POST since we submit data to be processed. A
drawback of that change will be that with the post, a user is not able to
bookmark the search result.

 Paolo


2014-05-06 20:55 GMT+02:00 Anthony <[email protected]>:

> I think when the browser makes the request, it strips any existing query
> string from the form action and replaces it with a query string containing
> the form data. A workaround would be to include hidden fields in the form
> that contain the original query string variables. This could be done in the
> server side code or via JavaScript. The advantage of the latter is that it
> could more easily be made to work with custom search widgets (also possible
> on the server side, but would be difficult if the custom widget is not a
> web2py FORM object).
>
> Maybe submit a Google issue and link to this thread.
>
> Anthony
>
>
> On Monday, May 5, 2014 8:28:41 AM UTC-4, Paolo Valleri wrote:
>
>> Dear all,
>> I've implemented a method which uses SQLFORM.grid to show a subset of a
>> given table. The query that defines the subset is built using a variable
>> passed to the method through request.vars.*.
>> Everything works as expected but search, namely when I type search for
>> something all former request.vars are erased.
>> Actually the action url of the form is correct it has all request.vars
>> variable plus the signature, when I type search all of them are replaced by
>> the variable 'keywords'
>> Is this the expected behavior for SQLFORM.grid search?
>>
>> Regards
>> Paolo
>>
>  --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/xlQfmCUZci0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

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