Custom field search – drop list with all or specific item selected

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom field search – drop list with all or specific item selected

This topic contains 2 replies, has 2 voices, and was last updated by Patryk Patryk 6 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8831
    Patryk
    Patryk
    Participant

    Hello,
    I’m not sure this thing will be possible but to the point :

    Main search on the site is responsible for finding firms based on the city they are in.
    Now the search works on checklist – for now it’s not so irritating because there are only few cities, but when there will be 30 or 40 of them, this can be a pain.

    While changing the checklist to dropdown option – it’s almost perfect but there is only one possible city to pick.

    now when I change option to drop list I can pick let’s say

    City1
    City2
    City3
    City4

    But what would be a perfect solution :

    All Cities
    City1
    City2
    City3
    City4

    Is there a way to insert a default search option that would show “All Cities”?

    The fields are defined in Frontend Search Settings > Custom Fields > Miasto

    Any thought about this will be a huge help!
    If you need any more info or something isn’t clear, please let me know

    Regards
    Patryk

    P.S
    That plugin is amazing!

    #8840
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Patryk!

    Thank you for your kind words! It is actually possible to add an “empty” option, which basically ignores the filter: https://goo.gl/vVwCqH

    You can basically add this line on the top of the checkbox list:

    ||All cities**

    It’s not exactly equivalent to “All cities”, it’s rather “Any city”, because it simply ignores the filter. In case of “All” it should check if the custom field exists and if the value is within all the provided values. But I hope it still does the job for you 🙂

    Best,
    Ernest Marcinko

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


    #8844
    Patryk
    Patryk
    Participant

    Hello Ernest,

    I think that will do the job 😀 thank you very much !
    I’ll definitely need to spend a day or two to look more deeply into all things this plugin can do. Probably it won’t be enough 😉

    Have a goooooood day !

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

You must be logged in to reply to this topic.