Field types¶
A compound uses the field types your installed modules provide, each with its own widget, formatter and validation. The type chooser grows as you enable core, contributed or custom modules.
| Values to group | Example field types | Provider |
|---|---|---|
| Session names and summaries | Short text, long text, formatted text | Core; Text for formatted values |
| Prices, capacity and flags | Integer, decimal, boolean | Core |
| Contact details | Email, telephone, link | Core; Telephone and Link modules |
| Dates | Date, date range, timestamp | Core; Datetime and Datetime Range modules |
| Fixed choices | Text and integer lists | Core Options |
| Uploaded files | File and image | Core File and Image |
| Existing content | References to content, taxonomy terms or media | Core Entity Reference; the target's module |
| Postal addresses | Address, country, zone | Contributed Address module |
| Revisioned content | Entity Reference Revisions | Contributed Entity Reference Revisions |
| Another grouped record | A compound field you have defined | Compound Field |
Build a session with Address, Media, taxonomy, content references, email and a link. A custom field type joins a compound through the same plugin system, with no second implementation for Compound Field.
Measured parity¶
The table below records the result of CompoundFieldTypeMatrixTest, an automated
comparison of a one-sub-field
compound with a standalone field of the same type, settings and sample value.
PASS means the saved values, validation violation counts and formatter output
match.
Each row measures one value at sub-field cardinality 1 and does not establish
widget support or cover every setting. Capped sub-fields, nesting (any acyclic
depth; cycles and unknown types are refused) and Media Library (including
nested capped selections) are covered separately. The entity_reference row
targets taxonomy terms.
List class: the type declares its own item-list class. Sample: the type's
own generateSampleValue(), or a supplied value where it has none. The
Address samples leave some columns unset to check NULL preservation.
| Field type | Provider | List class | Sample | Verdict | Notes |
|---|---|---|---|---|---|
boolean |
core | no | Own generator | PASS | — |
decimal |
core | no | Own generator | PASS | — |
email |
core | no | Own generator | PASS | — |
integer |
core | no | Own generator | PASS | — |
string |
core | no | Own generator | PASS | — |
string_long |
core | no | Own generator | PASS | — |
telephone |
telephone | no | Own generator | PASS | — |
timestamp |
core | no | Own generator | PASS | — |
link |
link | no | Own generator | PASS | — |
text |
text | yes | Own generator | PASS | — |
text_long |
text | yes | Own generator | PASS | — |
text_with_summary |
text | yes | Own generator | PASS | — |
list_string |
options | no | Own generator | PASS | — |
list_integer |
options | no | Own generator | PASS | — |
datetime |
datetime | yes | Own generator | PASS | — |
daterange |
datetime_range | yes | Own generator | PASS | — |
entity_reference |
core | yes | Own generator | PASS | — |
file |
file | yes | Own generator | PASS | — |
image |
image | yes | Own generator | PASS | — |
address |
address | yes | Harness-supplied | PASS | — |
address_country |
address | no | Harness-supplied | PASS | — |
address_zone |
address | yes | Harness-supplied | PASS | — |
entity_reference_revisions |
entity_reference_revisions | yes | Own generator | PASS | Measured where Paragraphs is installed, on the plain host and on a translatable, moderated entity_test_mulrevpub — see below |
A row for an optional module is measured only where that module is installed.
A pass here says a sub-field of that type behaves like a standalone field of the same type. It says nothing about another module's own per-field logic; see modules and compound items as entities for that.
Not exercised here¶
comment: its bundle and host requirements exceed what the comparison sets up.geofieldandoffice_hours: not measured.
Sample values¶
Compound Field supplies sample-value fallbacks for address, address_country
and address_zone, including restricted country lists; the matrix uses its own
samples to test those types independently of the fallback. When a reference
generator returns an unsaved entity, Compound Field uses an existing target
where possible, or saves the placeholder if the bundle allows it. A type that
cannot resolve, has no usable generator or fallback, or throws while generating
is omitted with a warning on the compound_field log channel, so a generated
host can fail required-field validation.
Revision references¶
entity_reference_revisions needs Entity Reference Revisions and Paragraphs;
the row was measured at 1.14 and 1.23, on a plain host and on a translatable,
moderated one. Child revision forking and change detection are covered too.
See translation and moderation.
A paragraph's parent metadata names the outermost host and its compound field,
not the sub-field slot: getParentEntity() resolves the host, whose compound
field then returns compound items, not the paragraph. Orphaned paragraphs
reach the purge queue, but the upstream purger does not recognise the
compound's flattened revision-reference columns and skips them, so orphans
accumulate. Changing a revision-reference sub-field's target_type while the
compound is in use is refused, because existing IDs would change meaning.