# Multiple checkbox and search filter for repeater

**URL:** <https://forum.wixstudio.com/t/multiple-checkbox-and-search-filter-for-repeater/43917>\
**Category:** Ask the community\
**Tags:** technical-talk, wix-members-area, code, partners\
**Created:** [September 15, 2022, 3:00pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-and-search-filter-for-repeater/43917 "2022-09-15T15:00:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chizor\_dike](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chizor_dike/32/34596_2.png) [@chizor\_dike](https://forum.wixstudio.com/u/chizor_dike)\
**Post date:** [September 15, 2022, 3:00pm UTC](https://forum.wixstudio.com/t/multiple-checkbox-and-search-filter-for-repeater/43917/1 "2022-09-15T15:00:21Z")

</div>

Hi Guys! i need some help. So im working on a website to display the profiles of some members. i want the users to be able to filter with practice area or location or both or to search by name. ive been able to create the two check boxes but its only able to work if the two checkboxes are checked. i also dont know how to add the search filter. PLEASE HELP. This is the code i used for the page

**import** wixData **from** ‘wix-data’ ;

$w . onReady ( **function** () {  
filterView ();

```
$w ( "#checkboxGroup1" ). onChange (( event , $w ) => { 
    filterView (); 
}); 

$w ( "#checkboxGroup2" ). onChange (( event , $w ) => { 
    filterView (); 
}); 

```

});

**function** filterView ( ) {  
**var** practiseArea2Filter = $w ( “#checkboxGroup1” ). value  
**var** locationFilter = $w ( “#checkboxGroup2” ). value

```
console . log ( 'practiseArea2' , practiseArea2Filter ); 
console . log ( 'location' , locationFilter ); 

$w ( "#dataset1" ). setFilter ( wixData . filter () 
        . hasSome ( "practiseArea2" , practiseArea2Filter ) 
        . hasSome ( "location" , locationFilter ) 
    ) 

    . then (() => { 
        **let** count = $w ( "#dataset1" ). getTotalCount (); 
        **if** ( count === 0 ) { 
            $w ( "#group1" ). show (); 
        } **else** { 
            $w ( "#group1" ). hide (); 
        } 
    }) 
    . **catch** (( err ) => { 
        console . log ( err ); 
    }); 

```

}
