Drupal – Show exposed filter value in Views header/footer

I want to show the submitted exposed filter data in the Views header/footer. This can be done by retrieving the $view object in PHP. The following code will printed the exposed filter data. Apply it to the Views header/footer with PHP enabled.

<?php
  $view = views_get_current_view();
  print_r($view->exposed_input);
?>

 

Done =)

Reference: Use data from exposed filter in title or header

4 thoughts on “Drupal – Show exposed filter value in Views header/footer”

      1. The issue is what would update the value? With Ajax, the page is not being reloaded, so no php is being run. You can always use JavaScript to do it, but I’m short on time. I may come back to this after I’m done migrating.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.