Change the default selection for a Views 2 exposed filter I have an exposed filter in my View that allows users to choose between two different content types. The default value for the exposed filter seems to be chosen by whichever content type comes first alphabetically. So, if I let users choose between "Band" and "Song" content types, the default is "Band". I want to change this default value to a different content type ("Song" in the example here). I can't find an option in the Views interface for this. Do I have to do this via hook_form_alter? If so, how exactly would I do that?
So, I tried the way that @David Lanier suggested, but couldn't quite wrap my head around it. So I went back to Drupal basics and tried it from the hook_form_alter() approach. After some troubleshooting, I also found a post about changing default Views filter values. I took the same approach and got it working. Below is the code a used, with a couple of modifications to take out my site-specific stuff. As always, be sure to replace "modulename" with the name of your module.

function modulename_form_alter(&amp;$form, $form_state, $form_id) {
 // is this the right form?
 if($form['#id'] == 'name-of-the-views-form-displayed') {
   if (empty($_GET['label-of-the-filter']))  {
    $form_state['input']['label-of-the-filter'] = 'default-value-for-filter';
   }
  }
}


Just replace name-of-the-views-form-displayed with, you guessed, the name of the views form you want to change. The easiest way to find this is to inspect the source of the View in the browser (I love Firebug for this) and find the form element, then grab it's id attribute. To find the name of the filter and the value you should set, change the filters and perform the "search". Look in the address bar and you'll see the values you need to use here as parameters in the url.

Hope this helps get others around this issue too!