Reply To: How trigger live search after Custom Code: automatically select filter values?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How trigger live search after Custom Code: automatically select filter values? Reply To: How trigger live search after Custom Code: automatically select filter values?

#31436
Ernest Marcinko
Ernest Marcinko
Keymaster

It is actually possible to preset the fields via this API call.

In short:
1. You open the developer console on the https://www.illuminatoren.com/downloads/ page, on most browsers it is the F12 button.
2. Change the filter states however you want them – check/uncheck the checkboxes etc..
3. Now, getting the state URI. Your search ID for that search bar is 1, so you type in to the console:

ASP.api(1, 'getStateURL')

and it will print out the page URL with some query arguments: https://i.imgur.com/Jdcekk7.png
4. Visiting that URL will preset the filters exactly as you changed them before. Use this for your desired button as the URL.
5. You can repeat this proces as many times as you want with as many different variations you need.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)