I've got a question that I can't seem to get fixed all by myself... I've got a search form and each entry has got field with some checkboxes (in this case these are options). Now I'd like to search when they check multiple checkboxes but I can't seem to get that to work... I've set up a form in which I'm fetching a parameter and just to test it with 2 checkboxes checked I've split them up in 'week1' and 'week2' like so:
{% set week_search_query = week1 ~ ' ' ~ week2 %}
I've tried the same with 'and' and '&' in between the quotes but can't seem to get it to work, while with the 'week1' alone like so:
{% set week_search_query = week1 %}
it works perfectly. (if I print out the content of 'week_search_query' in this case I get
weken2017:41
with weken2017 as fieldname and 41 as value). But what I'd like to to is search by 2 checked checkboxes at once as in the first example, so I can:
craft.entries.search(week_search_query)
All help is welcome, I feel like quite a newbie ATM :-)