In a drupal 7 website, I have a view that is based on a custom table. I have a status column in that custom table, which is type of integer and has 0 or 1 value, and in a view I want to add exposed filter with dropdown, with values somehow like below
$options = 'No'; $options = 'Yes';
So that a user can choose a value from dropdown and filter out data.
So in my views.inc file I have implemented hook_views_data(), then I have added the following code to make that field accessible in a view
$data['custom_users']['status'] = array( 'title' => t('User Status'), 'help' => t('User Status'), 'field' => array( 'click sortable' => TRUE, ), 'filter' => array( 'handler' => 'views_handler_filter_numeric', ), 'sort' => array( 'handler' => 'views_handler_sort', ), );
Now when I am trying to add exposed filter using this field I am not able to make it available as dropdown. I am only getting a textfield as exposed filter for this field.
Any help will be appreciated.