Filter - Submit element : Display if a filter is active

Hi bricks team,

Using search filter element and query loop, I have created an Ajax search. Here, I used the Filter - Submit element as the reset button. Therefore, if the user clicks on it after typing, the searched term will be deleted.
But the problem is that this button is still displayed even if the user has not searched for anything. Therefore, if the Filter-Submit element has an option, to be displayed if the filter is active, the problem will be solved.

1 Like

Hey there :slight_smile: This can be easily done with modern CSS. Just wrap the Filter - Reset and the Filter - Search into a div and use this CSS and replace the stars with your CSS ID’s or classes.

%root%:has(**ID of Filter - Search**:placeholder-shown) {
  & (**ID of Filter - Reset**) {
    visibility: hidden;
  }
}
1 Like