Combine Address and reference fields¶
Prepare the content to select¶
Add Address to the project with
composer require drupal/address. Enable Compound Field, Address, and core
Taxonomy, Media, Media Library, Image and Link. Create an Image media type under
Structure → Media types if the site has none. Create a Conference content
type, plus these reference targets:
- An Accessibility guide page of type Conference resource.
- An Accessibility term in a Conference tracks vocabulary.
- An Amina Torres portrait media item of type Image.
Create the session definition¶
Under Structure → Compound fields, create Conference session details. Add these optional sub-fields, each allowing one value:
| Label | Type | Settings |
|---|---|---|
| Session title | Short text | Defaults |
| Venue | Address | Machine-name suffix loc |
| Portrait | Media reference | Image media type |
| Track | Taxonomy reference | Conference tracks vocabulary |
| Related content | Content reference | Conference resource type |
| Contact email | Defaults | |
| Session link | Link | Allow a link title |
Use a short suffix for Address to leave room for its column property names. On Manage form display, select Media Library for Portrait. On Manage display, select rendered media for Portrait and Email link for Contact email.
Attach the compound to Conference as Featured session, allowing one value. Optionally select Inline columns in the host widget settings. The pictured layout gives Session title 100% width and the other fields 50% each.
Edit and save a featured session¶
- Add a Conference with Session title Opening keynote.
- Select United Kingdom for Venue and fill in the address and postcode. Country selection controls the address inputs and required values.
- Select Accessibility for Track, Amina Torres portrait through Media Library, and Accessibility guide for Related content.
- Enter
conference@example.comandhttps://example.com/programme. - Save, view and reopen. Check all values and reference targets.

The term, media and content page remain separate, reusable entities.