Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Webform Cookbook

How to create a custom Views exposed filter form [VIDEO]

Last updated on
15 March 2017

 How to create a custom Views exposed filter form

Problem

The Views module allows filters to be exposed as a form above the displayed results or even as a block. The problem is that the Views module only supports one exposed filter form per view display and the exposed filter form displays all the available exposed filters.

Solution

This recipe will show you how create a custom webform that acts as a exposed filter form for a View which can placed as block anywhere on a website

Steps

  • Select a Views exposed filter form
  • Submit the form
  • Examine the querystring parameters
  • Inspect the form
  • Create a new webform
  • Add desired filter elements
  • Update the webform's method to be a GET (Custom)
  • Set the 'Action' to the Views exposed filter form's URL
  • Test that the webform works as expected
  • Place the webform as a block on your website

Assets

Attached is the custom webform used in this recipe.

Help improve this page

Page status: No known problems

You can: