Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Datalist

233 sites Security covered Drupal 9–11
View on drupal.org

This module adds an HTML datalist form element to Drupal, providing a user-friendly and accessible alternative to traditional select fields by offering built-in search capabilities. It also includes a clear button, basic theming, and a Webform element, with a field type currently in development.

What does it do

Adds a form element for a HTML Datalist.
Adds an extra's "clear" field button and basic theming.

It works more or less the same as a select field but this has built in search capabilities.
This is actually better for accessibility and other use cases then for example select2 and others which aren't really accessible (even though they come close).

When providing options to datalist make sure it's an associative array. (Value => label)
The value will be submitted, the label is visible. (This can be tweaked via the use_keys settings).

A Webform element is also present.

A field type is in development.

Usage

<?php
 $form['list_of_xxx'] = array(
 *   '#type' => 'datalist',
 *   '#options' => [
        1 => 'Label 1',
      ],
 *   '#title' => 'Title',
 *   '#required' => TRUE,
 *   '#....
 * );
?>

Why?

For accessibility and UX reasons we've switched from select, select2 and others to HTML Datalist.

Supporting organizations

  • Federal Police Belgium

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Nov 2024
Latest release
1 month ago
Releases (12 mo)
2 ▼ from 4
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.10 Stable 9–11 Jul 22, 2026
1.0.9 Stable 9–11 Jul 17, 2026
1.0.8 Stable 9–11 Jan 29, 2025
1.0.7 Stable 9–11 Dec 3, 2024
1.0.6 Stable 9–11 Nov 21, 2024
1.0.5 Stable 9–11 Nov 12, 2024