The Craft 6 beta is out. Learn what's new and how Craft 6 works on Laravel. Explore Craft 6
Craft 6 adds three relationship column types to the Table field: Entries, Assets, and Users. In this lesson we add them to an existing Table field on a real estate site, configure their sources and limits, select related elements in each row, and see the results on the front end, including what happens when a required cell is left empty. It's a lighter-weight way to add relationships to repeating content without reaching for a Matrix field.
Craft 6 Table fields can now select real entries, assets, and users. The new relationship column types first shipped in Craft 6.0.0‑beta.2 (PR #20728).
In this video, I cover:
We start with an existing Table field, Listing Resources, on the Property entry type of a real estate site. It has a single plain-text Resource column. From the field’s settings we add three new columns:
Back on the property entry, each Table row now has element selectors for the three columns. Pick a document, a news entry, and a user, save, and the row keeps real relationships, not text labels or copied IDs. Because each column requires exactly one selection, leaving the Owner cell empty stops the save with “One or more table cells contained invalid values.”
On the front end, the property page lists each resource row with its related news article, its PDF download, and its owner. Add more rows and each one gets its own set of relationships.
Table fields have always been fine, but limited to simple values. With relationship columns, you can model repeating rows of related content without deploying a Matrix field. Craft 6 is still in beta, so check your installed release before using this on a project.
Find all of the Craft 6 videos at craftquest.io/craft‑6.
Follow along with the full transcript
Search every word, click any line to jump to that moment, and read along as you watch. A CraftQuest Premium feature.
Sign up for Premium