Allow collapsing / expanding of multivalue items

Created on 18 August 2025, 6 days ago

Problem/Motivation

We use custom_field to create multivalue fields, containing a bunch of properties / subfields.
While this allows site editors to add rather complex multivalue data, it is a challenge for them to reorder the items, once created.

In some cases we are using modals for content editing, which makes it even more challenging.

Example:

A video of me trying to reorder the items for a custom_field field with a bunch of subfields, is available here:
https://www.drupal.org/files/issues/2025-08-18/custom_field_reorder_issu... β†’

For example the Paragraphs module seems to provide a better UX for this, with Collapse (all) / Edit (all) buttons:

By default the editing experience would be similar, with all fields exposed:

Clicking "Collapse all" gives us the following:

This allows for easy reordering, and subsequently editing a specific item.

✨ Feature request
Status

Active

Version

3.1

Component

User interface

Created by

πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @svendecabooter
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    This is already supported. Just go to the form display settings and change the wrapper to details and uncheck the box "Show open by default?"

  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    Yeah I have set it up with "Details" wrapper currently.
    Would be good to allow for 1-click collapsing / expanding though, to easily switch between "editing" mode and "reordering" mode.

  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    Okay, that makes sense. We can perhaps add setting to handle this and maybe its possible with #states or custom js.

Production build 0.71.5 2024