Add the possibility to specify field-related options to array field items - #780
Merged
Conversation
giuscris
force-pushed
the
feature/array-field-types-support
branch
from
November 13, 2025 22:03
c1e0378 to
35ce8fc
Compare
giuscris
force-pushed
the
feature/array-field-types-support
branch
from
November 15, 2025 08:38
35ce8fc to
5edb65d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 11 comments.
馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the handling of array fields in forms, both in backend PHP logic and frontend TypeScript/SCSS code. The changes enhance validation, dynamic field creation, and UI consistency for array-type form inputs, especially for associative arrays and complex item types.
Backend: Array Field Enhancements
allowEmptyValuesand improved validation logic in thearrayfield type, ensuring empty values are handled according to configuration.itemsmethod for dynamically generating fields for each array item usingFieldFactory, and areturnmethod for structured output.FieldFactoryto the closure.keyBymethod toAbstractCollectionto allow collections to be indexed by item key, supporting the new array field logic.formNamemethod inFieldto allow overriding the form field name via options.Frontend: Form and Array Input Refactor
Formclass to use a unifiedformInputsarray and an association-based input loader, supporting dynamic and complex input types (including array fields). [1] [2]duplicateInputmethod to theFormclass for duplicating input nodes, supporting dynamic addition of array items.ArrayInputto work with fieldsets, cache item inputs, and handle associative arrays more robustly, including correct value extraction and event binding. [1] [2]UI/UX and Styling Improvements
.form-input-arrayand its children to improve layout, spacing, and support for different item types (e.g., markdown, textarea), resulting in a more consistent and flexible UI. [1] [2]Backend: Array Field Enhancements
allowEmptyValuessupport, improved validation, and dynamic item field generation to thearrayfield type informwork/fields/array.php. [1] [2]keyBymethod toAbstractCollectionfor key-based indexing, used by array fields.Fieldclass via theformNamemethod.Frontend: Form and Array Input Refactor
Formclass to use an association-based loader for all input types, supporting dynamic and complex fields, and added input duplication logic. [1] [2] [3]ArrayInputto support fieldsets, improved value extraction, and better handling of associative arrays. [1] [2]UI/UX and Styling Improvements
.form-input-arraySCSS for better layout and support for various item types. [1] [2]