Buy Now
Sign in

Passing Form Data through Paginator and Search

itpates , February 27 at 21:27
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:
Best regards
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!
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 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?