Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Range Form API

No security coverage Under active development

Part of the Range ecosystem · 4 projects

This project enhances Drupal's form building capabilities by adding support for range input fields. It allows developers to easily create forms where users can select a minimum and maximum value within a specified range, offering a user-friendly way to input numerical data.

Adds Form API support for the Range module.

Features

Adds the following Form API render elements:

  • Here, answer the following questions: What is the basic functionality? What unique features does enabling this project add? When and why would someone use this module? What use cases are there?

Includes theme suggestions for --range form elements and input elements.

Post-Installation

Once enabled, add to your forms as follows:

$form['my_range'] = [
  '#default_value' => [
          'from' => 1,
          'to' => 1,
        ],
        '#from_label' => $this->t('Min'),
        '#max' => 1000,
        '#min' => 1,
        '#title' => $this->t('Range'),
        '#to_label' => $this->t('Max'),
        '#type' => 'range_integer',
  ],
];
$my_range = $form_state->getValue('my_range');
$from_val = $my_range['from'];
$to_val = $my_range['to'];

Additional Requirements

Supporting this Module

Sponsor me at https://github.com/sponsors/cybtachyon

Ask your assistant about Range Form API

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
1
Tracked since
Oct 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
0.0.1-alpha1 Pre-release 11 Oct 9, 2026