Jump to content

Front end ajax select filters based on pages data


Krlos
 Share

Recommended Posts

Hi, I'm trying to figure it out how to accomplish this:

I have a large list of tabular data with Names, Address, Phones, ID, etc., and I need to present this data for users to search. (about 400 records)

I was thinking on creating an ajax live search, but I do not have the knowledge to do it, if someone can direct me on how to approach this that would be great.

What I'm missing the most is:

- How to query pages (custom fields) in ajax on the front end (Json? how?)

- How can I use a pluggin like Jquery Datatable to filter the data

OR

- There is a Processwire module that I can leverage for this problem.

Thanks in advance!!



 

 

Link to comment
Share on other sites

You could also look at this code/module by @Soma for the live search feature:  https://github.com/somatonic/AjaxSearch/blob/master/AjaxSearch.js

Then its up to you to do your logic in the search.php template.

To filter the data, check the doc/example : 

- https://datatables.net/examples/plug-ins/range_filtering.html

- https://datatables.net/examples/api/multi_filter.html

- https://www.google.fr/search?q=jquery+datatables+filter

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...