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
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.
More in the Range ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 0.0.1-alpha1 | Pre-release | 11 | Oct 9, 2026 |