I am using your code from here: "Exposed filters" expose too much

http://drupal.org/node/84124

function theme_views_display_filters_VIEWNAME($view) {
  $form = views_filters_form($view);
  // filter1 or filter2 or filter3 depending on which filter you need
  $options = $form['filter1']['#options'];
 
  // ... code to remove options you don't want ...
  // example
  foreach ($options as $option => $text) {
    if (!in_array($option, array('page', 'blog', 'story'))) {
      unset($options[$option]);
    }
  }
  $form['filter1']['#options'] = $options;
  return drupal_get_form("views_filters_$view->name", $form, 'views_filters');
}

How could I change the default value if I "removed" the previous default value with this code?

thank you , drupalfo

Comments

sun’s picture

Status: Active » Closed (won't fix)

Sorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support. Additionally, the answer to your question might be covered in the handbooks at http://drupal.org/handbook/modules/views already.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.