I have multiple checkboxes for example hospital checkbox where hospital datasets get displayed when checked, phase 1 check box where phase 1 hospitals get displayed when checked and grade A and B check boxes where when A is checked grade A hospital gets displayed. This is a kind of static filter.But I need dynamic filtering. For example, when phase 1 is checked and then grade A is checked I need phase 1 hospitals having grade A to get displayed. Likewise for other flters. Can anyone give suggestion on it using CQL_FILTERING and OpenLayers?
You can simply create a CQL filter that combines the elements that you need to select, so:
CQL_FILTER=phase=1 AND grade='A'
OpenLayers should take care of URL encoding it for you.