How to make selectors react to search terms

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to make selectors react to search terms

This topic contains 2 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11823
    petermac
    petermac
    Participant

    I have 2 questions:

    1) I want to know if its possible to have the search terms filter the options boxes as the user types into the search area. So for example, I have the category of housing with subcategory of apartments, condos, cabins. When the user starts typing “c” can the check boxes on the term selector refresh to only have condos and cabins as checked since apartments does not start with a “c”?

    2) how do I not show results until the user presses enter or clicks on the search icon?

    #11825
    petermac
    petermac
    Participant

    I figured out part 2) … no need to reply to that one, thanks

    #11837
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. This is a tricky one, with a custom javascript it should be possible. I will try to help you out on this one, but please note that customization requests are not part of the support, so I cannot guarantee my solutions will work in all cases.

    Here is how I would do it: Make a script handler, that watches the search phrase, and it the so-far typed in phrase matches any of the selectors, check them, if not, then check all instead.
    I’ve come up with the following solution:

    Place it into the functions.php file in your active theme directory. It worked on my test server, let’s hope it works on yours too.

    Best,
    Ernest Marcinko

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


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.