1

I have searched everywhere for a solution to this problem but have yet to find one.

I have a form whereby a user can filter Recipes by type and meal time. There are 10 types and 4 meal times. They are all check boxes.

What I need to happen is that when a user selects multiple types/meals they are return with filtered entries.

I have looked into dynamic parameters but it only allows one 'type' and one 'meal time' to be returned and isn't ideal.

I did consider using segments but it would result in a long URL which I would have to use PHP on to separate 'types'/'meals times'. I also considered using POST but it didn't work as expected.

Will I have to resort to Vanilla PHP for this and if so can someone provide a few pointers.

Thanks

1
  • I had to do something like this before. The types and meals have to be fields or they can be categories?
    – Sobral
    Jun 6 '13 at 19:58
2

Low Search
http://gotolow.com/addons/low-search

Assuming your types/times are categories (which it sounds like they are)...

In your {exp:low_search:results} tag, you should use require_all="category". This will make sure the results only match entries with all the selected categories.

Your checkboxes should all be named category[].

{exp:channel:categories channel="recipes" style="linear"}
  <label><input type="checkbox" name="category[]" value="{category_id}"{if category_id IN ({low_search_category})} checked{/if}> {category_name}</label>
{/exp:channel:categories}
0
0

Yes, you will have to use PHP. You can create an Extension or Module and an ACTion URL to keep it clean. EE was not designed to handle this much data in an "SEO-friendly" or non-programmatic manner.

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.