Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Views filter select

519 sites Security covered Drupal 9–11

Part of the Views ecosystem · 280 projects

View on drupal.org

This module allows you to change a views exposed filter widget to a select dropdown list through code. This is useful for custom database tables where you want to provide a dropdown of existing values instead of a text input.

Adds a views filter select option.

This module allows you to alter a views data field exposed filter widget to be displayed as a select (dropdown) through code only. Can come in handy for custom database tables for selecting existing values instead of using the default textbox input field as an exposed filter.
Use hook_views_data_alter to change the filter id to "dropdownlist".

Used in https://www.drupal.org/project/search_api_tracking admins view.
Then this will generate something like the sort order in the following screenshot:

Usage

  $data['search_api_tracking_stats']['sort_order'] = [
    'title' => t('Sort order'),
    'field' => [
      'id' => 'standard',
    ],
    'filter' => [
      'id' => 'dropdownlist',
    ],
  ];

Note: "id=> dropdownlist".
This wille make the items appear in a dropdownlist.

This module doesn't do anything else must be addressed via code (views.inc - see above)

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
3
Tracked since
May 2023
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.2 Stable 9–11 Aug 11, 2026
1.0.1 Stable 8–10 Jan 25, 2024
1.0.x-dev Dev May 16, 2023