Buy Now
Sign in

Passing Form Data through Paginator and Search

itpates , February 27 2018, 21:27
itpates 116
February 27 2018, 21:27 #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 28
February 28 2018, 14:24 #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:
Best regards
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
itpates 116
February 28 2018, 14:46 #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.
itpates 116
March 05 2018, 17:09 #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?
simelas 190
September 01 2018, 14:57 #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
itpates 116
September 11 2018, 17:42 #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.
simelas 190
September 11 2018, 17:50 #380109
Hi itpates
search for " Keep search term in the search widget field when moving from page to page with paginator" in the forum.