All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

How to use checkboxes in Low Search?

Michel 24 Oct 2016 10:09 question, complete

Hi,

I can't seem to make my search working. It works fine on keywords and categories, but I also have a lot of checkboxes in my channel fields, and I can't get those in the search form. Which syntax do In eed to use?

Does anyone have an example please?

Best,
Michel

Replies

  1. Low 24 Oct 2016 10:24

    What do you mean, exactly?

    Do you want the content of the checkboxes you have in your entries searchable by keywords? Or do you want checkboxes in your search form and those need to reflect the ones that are in the publish form when creating/editing entries?

    What code do you have so far?

  2. Michel 24 Oct 2016 10:40

    Hi Low,

    thx for the fast response.

    I mean the second version. So I have checkboxes in my channel fields, and I want to show the same fields in my search form.

    I've stripped it down, here's my code. It works for that specific checkbox, but I have about 10 of them. I guess the exact parameter is not the right one.

    {exp:low_search:results query="{segment_3}" channel="panden" status="not Closed" search:te_koop="=Te koop"}
    {title}
    {/exp:low_search:results}

  3. Low 24 Oct 2016 10:46

    You're after the Field Search filter.

    Looking at your opening tag taking these rules into account, you can use this:

    <input type="checkbox" name="search:te_koop" value="=Te koop">


    Repeat for any other fields you might have.

  4. Michel 24 Oct 2016 11:12

    Great, that works!

    Thank you very muxh Low

    Michel