EasyAdmin Array Field
This field displays the contents of a property which is mapped to a Doctrine Array type and it allows you to add new elements dynamically using JavaScript. To manage a collection of related entities instead of scalar values, use the CollectionField.
In form pages (edit and new) it looks like this:
Basic Information
- PHP Class:
EasyCorp\Bundle \EasyAdminBundle \Field \ArrayField Doctrine DBAL Type used to store this value: it depends on the installed DBAL version
- DBAL v4:
simple_arrayorjson - DBAL v3:
array,simple_arrayorjson - DBAL v2:
array,simple_array,json_arrayorjson
- DBAL v4:
- Symfony Form Type used to render the field: CollectionType
Rendered as:
1 2 3 4
<!-- when loading the page this is transformed into a dynamic collection via JavaScript --> <input type="text" value="..."> <input type="text" value="..."> <!-- ... -->
Options
This field does not define any custom option.
This work, including the code samples, is licensed under a
Creative Commons BY-SA 3.0 license.