I am getting the results I want from my Low Search Form tag but would like to filter with checkboxes in my Low Search Filter tag. Could someone please help me with this? Thanks

My Low Search Filter tag uses Low Options, Low List and Solspace Tag:

{exp:low_search:filters query="{segment_3}"}
            <input type="checkbox" name="search:project[]" value="{option:value}"
            {if "{option:value}" ~ '/(^|\|)'.low_search_search:project.'($|\|)/'}checked="checked"{/if}/> 

    {exp:low_list:each items="0|100:0 to 100;200|300:200 to 300;400|600:400 to 600" sep=";"}
        <input type="checkbox" name="range:cost[]" value="{key}" {if key == low_search_range:cost} checked{/if}>

        <input type="checkbox" name="tag_id[]" value="{tag_id}"{if low_search_tag_id ~ '/\b'.tag_id.'\b/'} checked{/if}>
  • Which issue you are facing with above code? Mar 22 '17 at 11:39
  • Thanks for your response. When I check filter checkboxes they don't modify the query in the URL.
    – wjp
    Mar 23 '17 at 7:05

If you're using form elements like checkboxes, use the Form tag rather than the Filters tag. This will generate a <form> element around the checkboxes. You can then use JavaScript to submit the form when a checkbox is (un)checked.

Alternatively, you can use the Filters tag together with the (short syntax) URL tag to create a list of links rather than checkbox elements, which will just generate URLs instead of a form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.