Dependent list
This module allows fields on a form to dynamically update their options based on the selection made in a previous "parent" field. It supports list fields and filters options in real time using AJAX.
What This Module Does
Screenshots below show how the child field options change when a different parent value is selected.
Figure 1: Acquisition selected
Figure 2: Appropriation selected
When editing an entity (e.g. a node or paragraph), a dependent list field shows different options based on the value chosen in a "parent" list field. For example:
- Parent field: "Event main type" (Acquisition, Appropriation, Archaeology & fieldwork, etc.)
- Child field: "Event subtype" -> shows Auction, Bequest, Purchase, etc. when Acquisition is selected; Colonial appropriation, Confiscation, Destruction, etc. when Appropriation is selected; etc.
The module works with list fields (list_string, list_integer, list_float) and supports both select dropdowns and radio/checkbox widgets. Options are filtered in real time via AJAX when the parent value changes.
How to Use
-
Create two list fields on your content type (or other entity type):
- A parent field (e.g. "Country") with its allowed values.
- A child field (e.g. "City") with all possible values.
-
Configure the child field as dependent:
- Go to Structure -> Content types -> [Your type] -> Manage fields.
- Edit the child field (e.g. "City").
- Open the Dependent list configuration section.
- Choose the Dependency field (e.g. "Country").
- In the table, for each parent value, check which child options should be shown.
- Save the field.
-
Use the form:
- When creating/editing content, select a value in the parent field first.
- The child field options will update automatically based on your configuration.
Requirements
- Drupal 10 or 11
-
optionsandfield_uimodules
Testing Note
Testing has been done primarily with dropdown (select) lists. Radio buttons and checkboxes may not be fully tested; use with those widgets at your own discretion.
Spell Checking (CSpell)
Run CSpell locally before pushing:
./scripts/cspell.sh
Or with npx: npx cspell . (from the module directory).
Project-specific words are in .cspell-project-words.txt. Add new valid terms there as needed.
Depends on
Dependencies of the latest stable release
- field_ui Drupal core
- options Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.3.1 | Stable | 10–11 | Fix AJAX errors cause of parent changes | Jun 9, 2026 | |
| 1.3.0 | Stable | 10–11 | Working with multi-nested forms. | Apr 9, 2026 | |
| 1.2.0 | Stable | 10–11 | Working with inline entity form | Mar 9, 2026 | |
| 1.1.0 | Stable | 10–11 | checkboxes are working | Mar 5, 2026 | |
| 1.0.0 | Stable | 10–11 | 1st official release | Feb 23, 2026 | |
| 1.0.0-alpha1 | Pre-release | 10–11 | 1st release | Feb 22, 2026 | |
| 1.x-dev | Dev | 10–11 | dev branch for 1.x | Feb 22, 2026 |