Low Search: Only include in results if custom field is unchecked?
I have a single-channel Low Search. I have a checkbox field in my channel with two values. I'm trying to set up the search form so that if either box is checked, it would prevent the entry from appearing in the search results.
Ordinarily, I'd use status for this, but I'm already using that for something else.
Based on the documentation, it seems like I should be able to add this as a parameter to the low_search:form tag, like I would with a normal channel:entries tag. But I can't seem to construct it in a way that works.
I've tried:
search:checkbox_field="not Value1|Value2"
search:checkbox_field="=not Value1|Value2"
search:checkbox_field="IS_EMPTY"
In all three cases, entries that have checkmarks in one of the two checkboxes still appear in my search results.
I've confirmed that the custom field is searchable. I've rebuilt the search collection.
Am I going about this the wrong way? Is there a better way to construct this?
Replies
Low 8 Feb 2013 10:39
What exactly does your Form tag look like? You can use http://pastie.org for large chunks of code.
MattV 8 Feb 2013 19:32
Okay, I think I figured it out. The place to use those parameters is in the low_search:results tag, not the low_search:form tag. I guess I thought I was limiting the scope of the search with the parameter, but I really needed to just limit the scope of the results.
Low 8 Feb 2013 19:45
Yes, correct. Glad it worked out.