Views Filter Populate – Search Title and Body of nodes in one exposed filter

There are many forum links with numerous hacks detailing how to create a single exposed filter that combines search across multiple fields.   In Views 3 and Drupal 6 or 7 it is as simple as installing the Views Filter Populate

Setting up groups for views populate filter

Setting up groups for views populate filter

And that’s about it – just configure the new global filter to include your desired fields

Configure views filters populate

Configure views filters populate - include the fields you want searched

There isn’t much to know about this module, although I certainly haven’t tested it against dates or numbers, and I rather doubt that works. For text it works like a charm though – http://www.youtube.com/watch?v=AwZj8o2v4uM for the folks who like videos here’s your 1:45 of fun

One filter, two fields... yum

One filter, two fields... yum


Thanks + add any questions or comments below

This entry was posted in Planet_Drupal and tagged , , , , . Bookmark the permalink.

5 Responses to Views Filter Populate – Search Title and Body of nodes in one exposed filter

  1. Chris says:

    Did you manually populate the ‘Resource Grouping’ and ‘Resource Type’ filters? I am trying to dynamically populate these filters from the db, but am having trouble.
    I have set up webforms, created table views of the forms to populate the views, and am trying to allow filters that are dynamically populated from the submissions in the webforms (fields such as ‘Users’ and ‘Job Titles’).

  2. Chris says:

    Since Views 7.x-3.4 For Drupal 7, you don’t need the module to do this. From the project page: “Since Views 7.x-3.4, there is a “Global: combine field filter” built-in filter in Views, so you may not need this module.”

    I have just combined two fields, and can confirm that it works — you can search on both fields from the same form :-)

    • alibama says:

      Hey Chris – thanks for the heads up – you’re absolutely correct – this module is no longer needed :)