Problem/Motivation

Core supplies the button text "Add another item" for add more buttons. It would be valuable to be able to customize this text. Our team had ideas to change it globally to something like "Add another" which is more concise, or to be able to pass in an entity name, for example a card entity could have the button text read "Add another card".

There is a way forward in the Simple Add More contrib module issue for limited-cardinality fields Make interface text configurable, and I think it would be useful at the core level for unlimited-cardinality fields..

Steps to reproduce

  • Create a content type with a field that has unlimited cardinality
  • Observe that the button to add additional items to this field in the authoring form uses the text "Add another item"

Screenshot of authoring form depicting a button with button text "Add another item"

Proposed resolution

Create a core-supported way to globally modify button text used in the "Add another" button for unlimited-cardinality fields.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
drupal-button-add-another-item.png8.84 KBdead_arm

Comments

dead_arm created an issue. See original summary.

dead_arm’s picture

Issue summary: View changes
dead_arm’s picture

Issue summary: View changes
dead_arm’s picture

Title: Provide a way for the “Add another item” button text on unlimited fields to be more easily configurable » Provide a straightforward to configure“Add another item” button text on limited cardinality or unlimited cardinality fields
marcoscano’s picture

Title: Provide a straightforward to configure“Add another item” button text on limited cardinality or unlimited cardinality fields » Provide a straightforward way to configure“Add another item” button text on unlimited cardinality fields
Issue summary: View changes

Just clarifying title and description that this issue is about the unlimited-cardinality fields button (provided by core), since the button on limited-cardinality fields is provided by the contrib module.

anybody’s picture

Version: 10.0.x-dev » 10.1.x-dev
Issue tags: +Site builder experience (SX), +UX
Related issues: +#1394184: Add multiple items at once

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.