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 comment

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