Filter after Custom Field Type in Custom Filter I'm facing a problem with a custom field type in a custom filter. The field type isn't showing up in my filter-criterias in views. Do I have to tell the fieldtype somehow that it is filterable? Or is this a problem with my filter? I suppose the error is somewhere here:

function options_form(&amp;$form, &amp;$form_state) {
    parent::options_form($form, $form_state);
    $this-&gt;view-&gt;init_style();

    // Allow to choose all fields as possible.
    if ($this-&gt;view-&gt;style_plugin-&gt;uses_fields()) {
      $options = array();
      foreach ($this-&gt;view-&gt;display_handler-&gt;get_handlers('field') as $name =&gt; $field) {
        $options[$name] = $field-&gt;ui_name(TRUE);
      }
      if ($options) {
        $form['fields'] = array(
          '#type' =&gt; 'select',
          '#title' =&gt; t('Choose fields to combine for filtering'),
          '#description' =&gt; t("This filter doesn't work for very special field handlers."),
          '#multiple' =&gt; TRUE,
          '#options' =&gt; $options,
          '#default_value' =&gt; $this-&gt;options['fields'],
        );
      }
      else {
        form_set_error('', t('You have to add some fields to be able to use this filter.'));
      }
    }
  }


This is from my filter where it should show all fields, but does show only a few.
If you create a new field type, you need to tell Views about it. The hook in question is  https://api.drupal.org/api/views/views.api.php/function/hook_views_data/7

Through entries in this hook you tell views how to build its SQL queries and render the results. Once you have implemented the hook you'll need to clear cache and hopefully you'll see your fields appearing in the list of filters. If the query/render requirements are not addressed by Views' existing handlers, you'll need to write your own. https://api.drupal.org/api/views/views.api.php/group/views_handlers/7