I need to return filtered results from a low search form with checkboxes
My client needs to filter a number of products using using your low search - I want to pass a query string to a template using ajax - can you give me a hand with the syntax? The filtering is done using checkboxes and I was going to serialise the forms output but I cant seem to get the template to filter the results like they do when posting the form back. Thank you!
Replies
Low 17 Oct 2012 15:02
Hi!
Serializing the search form should work like you describe.
What does your search form look like? You can copy/paste the code in pastie.org to keep it readable.
Also, does the filtering work without the Ajax call?
enginehouse 18 Oct 2012 20:07
Hi I beg your pardon I have sent this question again to your email - I didn't notice your reply here...
The filtering works without the ajax:
http://cv.deckchairdesign.co.uk/index...
I am unsure if I need to add in extra parameters from the hidden fields to verify the input
http://pastie.org/5080591
Thank you for your help!
Low 18 Oct 2012 20:22
Quick reply while I'm in transit back home from a visit to the US -- if the filtering works without the Ajax call, then it should work *with* an Ajax call as well. Make sure all fields are sent correctly. Or use something like Firebug to look what the actual request is doing.
enginehouse 18 Oct 2012 21:57
Thank you for this - using chrome I am submitting this query string:
http://pastie.org/5081040
but I am getting a 404 returned. When I paste this into the browser and remove the result_page=products/category/trees/filter I get everything returned but no filtering.
Sorry to hassle but can you think of something I am missing?
Low 19 Oct 2012 13:48
Yeah, the URL you're using is not correct. Are you using jQuery? In that case you could use something like this:
enginehouse 20 Oct 2012 19:51
Lovely! Thanks for your help - I was being a dumbass :)