Forums Forums Search & Filter Pro Checkbox Select Multiple Values

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #55027

    Hi,

    I have a search form on my site which searches a selection of ACF fields. On the search form I’d like to display all values of a specific field (“Seasons”) as checkbox options. I can do this fine however I’d like to have an additional checkbox option that selects all values (as you have with a select box). For example my field is called “Seasons” so I’d like the checkboxes set out like this:

    All
    Spring
    Summer
    Autumn
    Winter

    I hope this makes sense?! Is this even possible to do?

    Thanks,

    James

    Trevor
    #55033

    Can I see the search form as you have it now, on a live URL?

    Anonymous
    #55038
    This reply has been marked as private.
    Trevor
    #55040

    Season is spelled wrong. (Seaon)

    Ah, I think I see. You have manually made the options? And for one you put a comma delimited list? But our plugin does not see it as a list, but a single value. However, I think you can cheat!!

    The ANY checkbox has this value:

    Spring,Summer,Autumn,Winter

    Try making it this:

    Spring-,-Summer-,-Autumn-,-Winter

    My guess is that it will tick all four seasons.

    Anonymous
    #55044

    Hi Trevor,

    Many thanks for that, works a treat!

    James

    Trevor
    #55045

    Can I mark this as resolved and close the thread?

    Anonymous
    #55046

    Sorry just one more thing! I’m trying to do the same thing to the 2nd set of check boxes but this time the code doesn’t appear to be working? Is there a limit on the number of check boxes you can apply that to?

    This is the code I’m adding to the value field for “Any”:

    Flowers-,-Foliage-,-Berries

    Thanks,

    James

    Trevor
    #55051

    The data operator in the form field needs to be OR, but for this field you have it set to AND (the other field you had it correctly set to OR).

    Anonymous
    #55054

    Perfect! Thanks for your help, consider this closed now.

    James

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