Buy Now
Sign in

Passing Form Data through Paginator and Search

itpates , February 27 2018
I
itpates 115
February 27 2018 #375739
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.
admin 25.5
February 28 2018 #375747
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:
{data:param_name_from_url_or_field_name}
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
I
itpates 115
February 28 2018 #375751
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.
I
itpates 115
March 05 2018 #375865
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?
S
simelas 173
September 01 2018 #379968
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
I
itpates 115
September 11 2018 #380108
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.
S
simelas 173
September 11 2018 #380109
Hi itpates
search for " Keep search term in the search widget field when moving from page to page with paginator" in the forum.