# Multiple Checkbox Filter

**URL:** <https://forum.wixstudio.com/t/multiple-checkbox-filter/39735>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [August 26, 2020, 9:02pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735 "2020-08-26T21:02:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tneely](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tneely](https://forum.wixstudio.com/u/tneely)\
**Post date:** [August 26, 2020, 9:02pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735/1 "2020-08-26T21:02:39Z")

</div>

# I am trying to modify Multiple Groups Filter Template

I am trying to modify the multiple group filter to allow users to select from different categories and only display results that match the criteria selected.

> **[Example: Multiple Groups Filter](https://www.wix.com/corvid/forum/tips-tutorials-examples/example-multiple-groups-filter)**
>
> Demonstrates CheckboxGroup for selection of multiple options within a group .hasSome() to match items whose collection field value equals any of the selected options WixDataFilter Links for this example View Template About this...

Users have the options to select “Plant Type” and “Lighting requirements”. For example, if I select Plant Type: Flowers  
Lightning Requirements : Indoor

I want results to be returned that matches both. Which is what the code currently does. However, if I just select Plant Type: Flowers and Leaves, nothing is returned since I didn’t select an option under lighting requirements.

I need to allow for searching using AND/OR conditions. A user should be able to search within a category (OR) . For example, I should be able to select Flowers and Leaves under Plant Type and results that matches either Flowers and Leaves are returned. For the AND condition, I should be able to select Flowers and Indoor and records that matches both conditions are returned. The current example is using the AND condition.

Please let me know how I can update the code to perform the (OR) condition. Also, If I was to add a third category called Soil Type with values : clay, loam, sand and silt. I want the (OR) condition to work if I select Plant Type and Soil Type without having a value selected for Lightning Requirements.

Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [August 26, 2020, 11:30pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735/2 "2020-08-26T23:30:34Z")

</div>

You will find your answer here…  
[https://russian-dima.wixsite.com/meinewebsite/blank-3](https://russian-dima.wixsite.com/meinewebsite/blank-3)

---

<div class="post-metadata">

**Author:** ![tneely](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tneely](https://forum.wixstudio.com/u/tneely)\
**Post date:** [August 28, 2020, 12:21pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735/3 "2020-08-28T12:21:07Z")

</div>

I would like to see some code examples of how to code this.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [August 28, 2020, 1:27pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735/4 "2020-08-28T13:27:32Z")

</div>

See more Code? You did not see the code in the example?  
All you have to do is to click here…

[![](https://us1.discourse-cdn.com/wix/original/3X/c/8/c83e0b6c84bc88c9943d4ea071fd88c9a23d58c0.png)](https://russian-dima.wixsite.com/meinewebsite/blank-3)

---

<div class="post-metadata">

**Author:** ![nanami](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/nanami/32/1875_2.png) [@nanami](https://forum.wixstudio.com/u/nanami)\
**Post date:** [August 29, 2020, 12:41pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-filter/39735/5 "2020-08-29T12:41:04Z")

</div>

Same, I need some article or something.
