Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When adding a new element to a form, if the key already exists within the form, then the new element overwrites the existing element.
This occurs when key is explicitly set (like for Flexbox) or is dynamically created from title of element (like for Text area).
I would have hoped the system would add a number to the end of key to make it unique (like "_2") or at least stop the adding of the element and display a message stating the key already exists.
Comment | File | Size | Author |
---|---|---|---|
#2 | creating_a_new_element-2882060-2.patch | 2.99 KB | jrockowitz |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThis is a major issue. The attached patch prevents duplicate elements from being created.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed that patch. Please download the latest release to review.
Comment #5
danjordan CreditAttribution: danjordan commentedTested and works great. Thanks Jacob