Drupal Tip #69: Add a "Reset Filters" Button to Exposed Views Filters

Drupal Tip #69: Add a "Reset Filters" Button to Exposed Views Filters

If your Drupal View has exposed filters (like Content Type, Author, Published status, etc.), you’ve probably wished for a simple "Reset Filters" button that clears all selections and returns users to the default results.

Good news: It’s easy to implement, and your users will love it.


🧭 Why Add a Reset Button?

  • Saves users from manually clearing filters one by one

  • Enhances usability, especially when multiple filters are used

  • Avoids confusion when no results show because of over-filtering


🛠️ How to Add a Reset Button in Views

✅ Method 1: Use the “Reset Button” Option in Views UI

  1. Go to your View that uses exposed filters (e.g., a Search page).

  2. Click Edit on the View.

  3. In the Exposed Form section:

  4. Save the View.

That’s it! You’ll now see a "Reset" button next to the Submit button on the search form.

🔄 Clicking it will reload the page and clear all the filters.


🎨 Optional: Customize the Button Label

You can change the label from “Reset” to something more friendly like:

  • “Clear Filters”

  • “Start Over”

  • “Reset Search”

This can be done via template override or by using the String Translation module.


🧪 Pro Tip

Want even more control?

Use JavaScript or a custom block to:

  • Reset without page reload

  • Style it as a clear icon

  • Place it above or below the filter block

But for 90% of use cases, Views’ built-in reset button is all you need!


✅ Summary

Feature Benefit

Reset Button Instantly clears all filters

Built-in Option No code needed

User-friendly Makes search more intuitive


💬 Do your Views filters have a reset option yet? If not, now’s a great time to add one!

Let me know if you'd like to see a screenshot, animation, or a sample template override for customizing the button style or placement!

To view or add a comment, sign in

Others also viewed

Explore topics