How to set Exposed filters in fieldset for specific Views? I found an article that can collapse exposed filters into fieldset. But this will change all Views. How can I set below code for specific Views only? For example, I wanna use this on ViewsA only.

&lt;?php
/**
 * hook_preprocess_views_view
 */
function YOUR_MODULE_NAME_preprocess_views_view(&amp;$vars) {
  // Wrap exposed filters in a fieldset.
  if ($vars['exposed']) {
    drupal_add_js('misc/form.js');
    drupal_add_js('misc/collapse.js');
    // Default collapsed
    $collapsed = TRUE;
    $class = array('collapsible', 'collapsed');
    if (count($_GET) &gt; 1){
      // assume other get vars are exposed filters, so expand fieldset
      // to show applied filters
      $collapsed = FALSE;
      $class = array('collapsible');
    }
    $fieldset['element'] = array(
      '#title' =&gt; t('Filter'),
      '#collapsible' =&gt; TRUE,
      '#collapsed' =&gt; $collapsed,
      '#attributes' =&gt; array('class' =&gt; $class),
      '#children' =&gt; $vars['exposed'],
    );
    $vars['exposed'] = theme('fieldset', $fieldset);
  }
}
?&gt;
This code will work for specific view. Example for "ViewsA"(reaplce ViewsA for your Views name and "my_module" for your module name).

&lt;?php
    /**
     * Implements hook_preprocess_views_view().
     */
    function my_module_preprocess_views_view(&amp;$vars) {
     // Assign to your specific view.
      if ($vars['view']-&gt;name === 'ViewsA') {
        // Wrap exposed filters in a fieldset.
        if ($vars['exposed']) {
          drupal_add_js('misc/form.js');
          drupal_add_js('misc/collapse.js');
          // Default collapsed
          $collapsed = TRUE;
          $class = array('collapsible', 'collapsed');
          if (count($_GET) &gt; 1){
            // assume other get vars are exposed filters, so expand fieldset
            // to show applied filters
            $collapsed = FALSE;
            $class = array('collapsible');
          }
          $fieldset['element'] = array(
            '#title' =&gt; t('Filter'),
            '#collapsible' =&gt; TRUE,
            '#collapsed' =&gt; $collapsed,
            '#attributes' =&gt; array('class' =&gt; $class),
            '#children' =&gt; $vars['exposed'],
          );
          $vars['exposed'] = theme('fieldset', $fieldset);
        }
      }
    }
?&gt;