I have one of custom table with fields named title and id. Now I want to add the title field in views exposed filter as drop down.

How to create exposed filter for this?

Could anyone explain where I can find this?

1 Answer 1


It should depend on how you are exposing the field to views, make sure views know about field and filter handler, so as an example in your hook_views_data() your title field should be exposed in following way -

// name field
$data['exposed']['title'] = array(
    'title' => t('Title'),
    'help' => t('title for record'),
    'field' => array(
        'handler' => 'views_handler_field',
    'filter' => array(
        'handler' => 'views_handler_filter_string',
 'sort' => array(
        'handler' => 'views_handler_sort',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.