Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

This module provides a flexible field type that can store quantities with different measurement types, such as weight, volume, plain counts, or named sizes, all within a single field. This is useful for content like recipes where ingredients can be measured in various ways, allowing each entry to use the appropriate unit without requiring separate fields for each measurement type.

Physical Multi Field solves a problem that comes up constantly on recipe and ingredient-list sites: a single quantity needs to be able to hold very different kinds of measurements from one row to the next. One ingredient is
a weight ("250 g flour"), another is a volume ("1.5 l stock"), another is a
plain count ("3 eggs"), and another is a named size ("1 large onion"). Drupal
core has no field type for this, and the popular Physical module locks
each field to a single measurement type, which forces site builders to add a
separate field for weight, a separate field for volume, and so on, and then
hide whichever ones don't apply to a given item. Physical Multi Field solves
this by providing one field type that stores the measurement type alongside
the quantity and unit on every individual value, so a single field can
represent any of these ingredient quantities side by side.

Features

  • One field type, four measurement kinds: weight, volume, plain count, and
    custom named sizes, chosen per value rather than being fixed per field.
  • Reuses the Physical module's unit definitions and bcmath-based
    conversion engine for weight and volume, so unit math (grams to ounces,
    liters to cups, and so on) is accurate and consistent with any other
    Physical-powered fields on the site.
  • Site builders choose which of the four measurement types are available
    on a given field, can restrict the offered units for weight and volume, and
    can define their own list of size labels (for example Small, Medium,
    Large).
  • The default widget presents a single quantity input alongside one unit
    select, grouped into optgroups by measurement type — there's no
    JavaScript-dependent "pick a type, then pick a unit" two-step interaction to
    keep in sync.
  • The default formatter displays the stored value with locale-aware
    number formatting, and can optionally convert weight and/or volume values to
    a chosen display unit (for example, always show weight in kilograms even
    when some values were entered in ounces).
  • Well suited to recipe websites, ingredient lists, product specification
    fields, or any content type where quantities naturally come in different
    measurement dimensions.

Post-Installation

After enabling the module (and its dependency, Physical), add a field of
type "Quantity (weight, volume, count, or size)" to any bundle from
Manage fields, exactly as you would add any other field.

On the field storage settings form, select which measurement types
(weight, volume, count, size) editors will be able to choose from for that
field — at least one is required:

  • If Weight or Volume is enabled, you can optionally restrict which units
    are offered; leaving all of a type's units unchecked allows every unit for
    that type.
  • If Size is enabled, enter one size label per line (for example Small,
    Medium, Large). Each line becomes a selectable option.

On the field instance's Manage form display tab, the default
"Quantity and unit" widget needs no special configuration beyond the usual
widget settings (placeholder text, input width, and whether to visually hide
the field labels).

On the field instance's Manage display tab, the default
"Quantity and unit" formatter can optionally be configured with a weight
and/or volume output unit, to always display those measurement types in a
specific unit regardless of what was entered. Count and size values are
unaffected by these settings.

Note: because a single field can mix weights, volumes,
counts, and sizes, sorting or filtering a view by the field's raw quantity
is not meaningful without first restricting to a single measurement type
(via a Views contextual or exposed filter on measurement_type).
This module does not ship that Views integration.

Additional Requirements

This module requires Physical,
which provides the weight and volume unit definitions and conversion math
this module builds on. Beyond that and Drupal core's Field module, there are
no other dependencies.

None beyond the required Physical module. Since Physical Multi Field does
not ship a Views integration for mixed-dimension sorting/filtering, Views
(included in Drupal core) is worth combining with a contextual or exposed
filter on measurement_type if you need to filter before sorting
numerically.

Similar projects

Physical provides
field types such as physical_measurement for weight, volume,
length, area, and other dimensions, but each field instance is locked to a
single measurement type. Physical Multi Field is built on top of Physical's
conversion engine and is intended for the opposite case: when a single field
needs to hold several different measurement types across its individual
values — as with a list of recipe ingredients — rather than one consistent
measurement type across the whole field.

Community Documentation

See the module's README.md and AGENTS.md for a deeper look at the
configuration workflow and the architectural reasoning behind storing the
measurement type per value instead of per field.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jul 2026
Latest release
3 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-beta1 Pre-release 10–11 Jul 7, 2026
1.0.x-dev Dev 10–11 Jul 7, 2026