I need to be able to paginate and/or search the results of a database querie, within the parameters of that querie. It is easy enough to use a dropdown to modify the querie via the WHERE statement, but after that, paginator and search are useless - there is no mechanism in them by which I can pass the desired form data to the WHERE statement to continue to paginate or search within the desired results.
Hi itpates,
I'm not sure I can understand your question, but you can use shortcodes in your WHERE conditions to capture any passed parameters:
I'm not sure I can understand your question, but you can use shortcodes in your WHERE conditions to capture any passed parameters:
{data:param_name_from_url_or_field_name}Best regards
Thanks. That is exactly what I have done. And that is the problem. Paginate, Search, and any links you have attached to the list of results, including being able to dynamically change the sorting - they all do not pass this parameter. They expect the WHERE condition to be pretty much hardcoded. So when it sees {data:param_name_from_url_or_field_name} they balk, because they are not passing that parameter anymore since it expired after the initial event.
For instance, I have a list of service tickets, and they are categorized by store. The entry to the form simply has a dropdown with the stores. You select what store you want to pull up a list of service tickets, and click go, and that parameter is passed to the WHERE statement, which in turn displays the desired list. BUT...that is where it ends. That parameter is now expired. Adding Search or Paginate to that, or anything else that uses your database function is confused because there is no data to pass to the WHERE statement, so everything is displayed instead. What I need - and what should be an option in Search, Paginate, etc - is to be able to capture the form-data in order to pass that on.
For instance, I have a list of service tickets, and they are categorized by store. The entry to the form simply has a dropdown with the stores. You select what store you want to pull up a list of service tickets, and click go, and that parameter is passed to the WHERE statement, which in turn displays the desired list. BUT...that is where it ends. That parameter is now expired. Adding Search or Paginate to that, or anything else that uses your database function is confused because there is no data to pass to the WHERE statement, so everything is displayed instead. What I need - and what should be an option in Search, Paginate, etc - is to be able to capture the form-data in order to pass that on.
I am having to create a separate form for each of our locations, resulting in a ton of redundancy. Please tell me you guys are working on this issue in a future release so I can bring everything into one form?
Hello itpates
maybe you could apply the solution as exposed in : Keep search term in the search widget field when moving from page to page with paginator
ciao
simelas
maybe you could apply the solution as exposed in : Keep search term in the search widget field when moving from page to page with paginator
ciao
simelas
Simelas - Not sure how to keep search term in widget in a way that allows for the next or previous set number of items to be displayed in the list.
This topic is locked and no more replies can be posted.