Add Entity Reference Quantity as an optional field in core

Created on 27 October 2016, over 8 years ago
Updated 24 June 2025, 12 days ago

Idea summary

What is the problem to solve?

(Missing functionality X, prevent Y from happening, make Z easier to do)

Who is this for?

(Evaluators, site visitors, content authors, site managers, (advanced) site builders, frontend developers, backend developers, core developers, site owners, other?)

Result: what will be the outcome?

(Describe the result: how will this improve things for the stated audience(s)?)

How can we know the desired result is achieved?

(Usability test, a metric to track, feedback)

--- Original report ---

Problem/Motivation

In the course of working on the example content model one of the blockers we discovered was the ability in core to have a reference field with a quantity eg, a term reference to "Sugar" from a taxonomy of ingredients, with a quantity field and units, Other examples could include:

Cart
[entity reference: product node],[value],[units]
eg.
Items in cart
Paving stones, 25
Fertilizer, 2, large bags
Pesticide, 3, ltr

Or
Generic alternatives with equivalent doses
[trem reference: drug],[value],[units]
eg.
Amoxycillin, 10mg
Arithromycin, 15mg

Or
Required credits (or hours) for transfer
[category: term reference], [value],[units]
eg.
History, 20 credits
Science, 15 credits
Math, 30 credits

Proposed resolution

Put entity reference quantity in core.

Remaining tasks

Decide if this is a good idea.

User interface changes

An eperimental field (disabled) would be available to enable in /extend

API changes

?

Data model changes

?

✨ Feature request
Status

Needs work

Component

General

Created by

πŸ‡ΊπŸ‡ΈUnited States tkoleary

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The Ideas project is being deprecated. As discussed in a core committer meeting issues that are adding modules are being moved to the Drupal CMS project for discussion.

  • πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    It would make sense to add this to a site template for a recipes website or any other example where it makes sense, but since it's not that widely applicable, I don't see us adding it to vanilla Drupal CMS.

Production build 0.71.5 2024