This project is not covered by Drupal’s security advisory policy.

What This Module Does

Screenshots below show how the child field options change when a different parent value is selected.

Figure 1: Acquisition selected

Event main type set to Acquisition; Event subtype dropdown shows Auction, Bequest, Commission, Donation/Gift, etc.

Figure 2: Appropriation selected

Event main type set to Appropriation; Event subtype dropdown shows Colonial appropriation, Confiscation, Expropriation, Looting, etc.

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

  1. 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.
  2. 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.
  3. 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
  • options and field_ui modules

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.

Project information

Releases