Custom Views Filter - won't display as checkboxes Trying to do a custom filter so that the user can select multiple states to filter the data by.  This works (or will when I do some customizing to the query after) but it shows a select box.  Any ideas?  Tearing hair out :)

&lt;?php
class custom_filters_handler_filter_state extends views_handler_filter_string{
  function value_form(&amp;$form, &amp;$form_state){
    $options = array(
     'DC' =&gt; 'DC',
     'MD' =&gt; 'MD',
     'VA' =&gt; 'VA',
    );
   $form['value'] = array(
   '#type' =&gt; 'checkboxes',
   '#title' =&gt; t('State'),
   '#multiple' =&gt; TRUE,
   '#options' =&gt; $options,
   );
return $form;
  }
}
I've the same issue, debugging the code I've seen that the exposed_translate() method changes any checkboxes form types to select if $form['#no_convert'] and #multiple are not set.

So you need to change it to:

$form['value'] = array(
   '#type' =&gt; 'checkboxes',
   '#title' =&gt; t('State'),
   '#multiple' =&gt; TRUE,
   '#options' =&gt; $options,
   '#no_convert' =&gt; TRUE,
);


Here is the code:

/**
   * Make some translations to a form item to make it more suitable to
   * exposing.
   */
  function exposed_translate(&amp;$form, $type) {
    if (!isset($form['#type'])) {
      return;
    }

    if ($form['#type'] == 'radios') {
      $form['#type'] = 'select';
    }
    // Checkboxes don't work so well in exposed forms due to GET conversions.
    if ($form['#type'] == 'checkboxes') {
      if (empty($form['#no_convert']) || empty($this-&gt;options['expose']['multiple'])) {
        $form['#type'] = 'select';
      }
      if (!empty($this-&gt;options['expose']['multiple'])) {
        $form['#multiple'] = TRUE;
      }
    }
    if (empty($this-&gt;options['expose']['multiple']) &amp;&amp; isset($form['#multiple'])) {
      unset($form['#multiple']);
      $form['#size'] = NULL;
    }

    // Cleanup in case the translated element's (radios or checkboxes) display value contains html.
    if ($form['#type'] == 'select') {
      $this-&gt;prepare_filter_select_options($form['#options']);
    }

    if ($type == 'value' &amp;&amp; empty($this-&gt;always_required) &amp;&amp; empty($this-&gt;options['expose']['required']) &amp;&amp; $form['#type'] == 'select' &amp;&amp; empty($form['#multiple'])) {
      $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? t('&lt;Any&gt;') : t('- Any -');
      $form['#options'] = array('All' =&gt; $any_label) + $form['#options'];
      $form['#default_value'] = 'All';
    }

    if (!empty($this-&gt;options['expose']['required'])) {
      $form['#required'] = TRUE;
    }
  }