How to create a search filter for a checkbox?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to create a search filter for a checkbox?

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46892
    dot832
    dot832
    Participant

    Hi,

    I am trying to configure a search for a single value in a checkbox filed. For example, the field I am searching is a custom field that is a type checkbox. The value I am looking for is the word “Flower” and is one of 10 possible values. Other fields in the CPT include name, website URL, city, state. If a user clicks Flowers, I want to display all names meeting the flower criteria.

    Would you please advise me on how to set this up?

    Thank you

    #46898
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    If you want to search by the “name” custom field, then I suggest the search by custom fields feature, where you can select the individual custom fields to search by.

    In case you need a filter (like a checkbox type layout), then creating a custom field filter is the way to go.

    Best,
    Ernest Marcinko

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


    #46900
    dot832
    dot832
    Participant

    Hello Ernest,

    Thank for your response. As a follow up I have two questions:

    1. How can I eliminate the horizontal scroll bar at the bottom of the checkbox list?
    2. How can I position the search results to the right instead of on top of the checkboxes?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #46902
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    1. It should not be there, my guess there is an added/inherent margin triggering it somewhere. Can I take a look at this? I can probably suggest a modification to prevent it.

    2. Yes, of course. The best way to do that is to use a HTML block container in your theme and use the search and the results shortcode separately wherever you need them.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.