Module Description
This module simplifies the multi-value widgets when they have fixed cardinality (max number of values allowed).

By default, Drupal core will expose on the form the maximum number of values allowed. This means that if a field can have up to 5 items, for example, the form will have 5 empty elements. The "Add another item" button that builds another item using AJAX is only included when the field has unlimited cardinality.

This often leads to bad UX for editors:



There is a core issue to improve this in core: #1156338: Fixed maximum number of field values, but use «add more» similar to when cardinality «unlimited» is used

While the above issue is trying to also use the AJAX button on fixed-cardinality fields, this module takes a different approach and adds clientside JS so that extra empty elements are hidden, and only the elements below will be displayed:

- On empty fields, only one empty element - On non-empty fields, only the non-empty elements

This module provides an "Add another item" button to reveal one new empty element at a time.



All interaction happens in the browser, there are no server/AJAX calls necessary.



Project Usage
1602
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to simplify multi-value widgets with fixed cardinality by hiding extra empty elements and providing an 'Add another item' button to reveal one new empty element at a time, all without the need for server/AJAX calls.
Data Name
sam

OPENAI CHATBOT

OPENAI CHATBOT

14:35:21
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.