How do I control the available options for an exposed filter? I have an exposed filter "country" for my member list view  (I'm using addressfield module to store the country).
I would like to only show countries in my exposed filters where I have members. I can manually restrict the filter by select countries.

Which one would be the best option, between the following ones?


theming views-exposed-form.tpl.php 
using hook_form_alter()
hiding some fields with CSS
I just did something similar for some data I'm exposing in Views for my custom module (it's kinda the same process no matter where views is getting its data).

To do this in the most efficient/easy way possible, you should create your own filter handler.

For a really simple example:

&lt;?php
class custom_handler_filter_countries extends views_handler_filter_string {
  /**
   * Shortcut to display the exposed options form.
   */
  function value_form(&amp;$form, &amp;$form_state) {
    $form['value'] = array(
      '#type' =&gt; 'select',
      '#title' =&gt; t('Countries'),
      '#options' =&gt; function_that_returns_options_you_want(),
    );

    return $form;
  }
}
?&gt;


Then, in your module's .info file, add the file containing this class (in this example, 'custom_handler_filter_countries.inc') to the .info file's files array (files[] = includes/custom_handler_filter_countries.inc).

To make your particular view use this views handler instead of the default handler, you should be able to change the handler in hook_views_pre_view(), I think. (On my particular site, since I defined the views data table myself, I just set my custom handler for fields that needed it. For your site, since the normal handler is already defined by Address Field, you need to override the filter handler.