Krlos Posted November 17, 2017 Posted November 17, 2017 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!!
dragan Posted November 17, 2017 Posted November 17, 2017 Do you intend to import this tabular data into PW as pages? If yes, have a look here: 2
flydev Posted November 18, 2017 Posted November 18, 2017 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 4 1
adrian Posted November 18, 2017 Posted November 18, 2017 9 hours ago, flydev said: You could also look at this code/module by @Soma for the live search feature: https://github.com/somatonic/AjaxSearch/blob/master/AjaxSearch.js Good suggestion - I have actually used this module (slightly modified) on the frontend - works great! 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now