PHPackages                             silverstripe/multivaluefield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. silverstripe/multivaluefield

Abandoned → [symbiote/silverstripe-multivaluefield](/?search=symbiote%2Fsilverstripe-multivaluefield)Silverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

silverstripe/multivaluefield
============================

A DB field + form fields for storing multiple values in a single property (serialized).

5.2.1(4y ago)47202.6k45[3 issues](https://github.com/silverstripe-australia/silverstripe-multivaluefield/issues)7BSD-3-ClausePHPPHP ^7.3 || ^8.0CI failing

Since Oct 30Pushed 9mo ago9 watchersCompare

[ Source](https://github.com/silverstripe-australia/silverstripe-multivaluefield)[ Packagist](https://packagist.org/packages/silverstripe/multivaluefield)[ RSS](/packages/silverstripe-multivaluefield/feed)WikiDiscussions 5 Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (61)Used By (7)

Silverstripe MultiValueField module
===================================

[](#silverstripe-multivaluefield-module)

[![CI](https://github.com/symbiote/silverstripe-multivaluefield/actions/workflows/ci.yml/badge.svg)](https://github.com/symbiote/silverstripe-multivaluefield/actions/workflows/ci.yml)[![Silverstripe supported module](https://camo.githubusercontent.com/9b7e93d393a01f6d3091fb30983b870aa863ef076858115faaa1c74b995854ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73696c7665727374726970652d737570706f727465642d3030373143342e737667)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)

Notes:

- The Silverstripe 2.4 compatible version of the module is still available in the ss24 branch
- The Silverstripe 3.x compatible versions are still available in the 2.x branches. (see version info)

A database field type that allows the storage of multiple discrete values in a single database field. This also provides form fields for entering multiple values in a simple manner

- MultiValueTextField - displays a text field. When data is entered, another text field is displayed directly beneath. Subsequent data entry triggers more text fields to appear
- MultiValueDropdownField - displays a dropdown field. When a value is selected another dropdown field is displayed.

Within templates, the field can be iterated over as per a data object set. The property $Value is available as a Varchar type, and other typical properties such as $FirstLast etc are inherited from ViewableData.

Data is stored in the database in a serialized PHP format. While this is not ideal for searching purposes, some external indexing engines (eg the Solr module) are aware of the field type and will index accordingly.

Version info
------------

[](#version-info)

This version of MultiValueField supports Silverstripe 4.0.0

Older versions of Silverstripe are supported on minor version branches below

- [Silverstripe 3.1+ compatible version](https://github.com/symbiote/silverstripe-multivaluefield/tree/2.4)

Installation
------------

[](#installation)

```
composer require symbiote/silverstripe-multivaluefield

```

Basic Usage
-----------

[](#basic-usage)

As with all DB fields

```
private static $db = array(
    'Keywords' 	=> 'MultiValueField',
);

```

To make use of the field on the frontend, you can loop over the Items property

```

    $Key $Value

```

In this case, `$Value` is a Varchar object, so you can call all relevant string field methods on it, such as `$Value.Raw`, `$Value.LimitWordCount` etc etc.

Note that to have the `$Key` value available as something other than an integer, use the `KeyValueField` field type to populate the field.

You can set the key and value placeholder values of the KeyValueField in your field like this:

```
$kvf = KeyValueField::create(
    'MultiChoiceAnswer',
    'Multiple Choice Answers'
);
$kvf->setValueFieldPlaceholder('Value');
$kvf->setKeyFieldPlaceholder('Label');

```

Maintainer Contacts
-------------------

[](#maintainer-contacts)

- Marcus Nyeholt

Requirements
------------

[](#requirements)

- Silverstripe 4.0

Contributing
------------

[](#contributing)

### Thanks

[](#thanks)

- [Ingo's initial work](https://github.com/symbiote/silverstripe-multivaluefield/pull/44) to getting this SS4 ready
- [muskie9's work](https://github.com/muskie9) on updating UI fields

### Translations

[](#translations)

Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code.

Please use  to contribute translations, rather than sending pull requests with YAML files.

License
-------

[](#license)

This module is licensed under the BSD license at

Project Links
-------------

[](#project-links)

- [GitHub Project Page](https://github.com/nyeholt/silverstripe-multivaluefield)
- [Issue Tracker](https://github.com/nyeholt/silverstripe-multivaluefield/issues)

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance40

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~33 days

Total

58

Last Release

1580d ago

Major Versions

2.2.x-dev → 5.0.02017-11-10

2.4.3 → 3.0.42018-01-09

3.0.3 → 5.0.12018-03-20

2.4.4 → 3.1.12019-02-18

3.1.x-dev → 5.0.22019-12-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

---

Top Contributors

[![nyeholt](https://avatars.githubusercontent.com/u/161730?v=4)](https://github.com/nyeholt "nyeholt (88 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (25 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (16 commits)")[![ajshort](https://avatars.githubusercontent.com/u/31570?v=4)](https://github.com/ajshort "ajshort (12 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (11 commits)")[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (7 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (7 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (3 commits)")[![mateusz](https://avatars.githubusercontent.com/u/118653?v=4)](https://github.com/mateusz "mateusz (3 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (2 commits)")[![a2nt](https://avatars.githubusercontent.com/u/672794?v=4)](https://github.com/a2nt "a2nt (1 commits)")[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (1 commits)")[![cjsewell](https://avatars.githubusercontent.com/u/1856199?v=4)](https://github.com/cjsewell "cjsewell (1 commits)")[![digitall-it](https://avatars.githubusercontent.com/u/3578378?v=4)](https://github.com/digitall-it "digitall-it (1 commits)")[![DrMartinGonzo](https://avatars.githubusercontent.com/u/11061711?v=4)](https://github.com/DrMartinGonzo "DrMartinGonzo (1 commits)")[![drzax](https://avatars.githubusercontent.com/u/596563?v=4)](https://github.com/drzax "drzax (1 commits)")[![elliot-sawyer](https://avatars.githubusercontent.com/u/354793?v=4)](https://github.com/elliot-sawyer "elliot-sawyer (1 commits)")[![ryanwachtl](https://avatars.githubusercontent.com/u/341209?v=4)](https://github.com/ryanwachtl "ryanwachtl (1 commits)")[![ScopeyNZ](https://avatars.githubusercontent.com/u/3260989?v=4)](https://github.com/ScopeyNZ "ScopeyNZ (1 commits)")[![sunnysideup](https://avatars.githubusercontent.com/u/167154?v=4)](https://github.com/sunnysideup "sunnysideup (1 commits)")

---

Tags

silverstripeformfielddbfield

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverstripe-multivaluefield/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-multivaluefield/health.svg)](https://phpackages.com/packages/silverstripe-multivaluefield)
```

###  Alternatives

[symbiote/silverstripe-multivaluefield

A DB field + form fields for storing multiple values in a single property (serialized).

47434.1k56](/packages/symbiote-silverstripe-multivaluefield)[nathancox/codeeditorfield

A field for editing code and JSON in the SilverStripe CMS using Ace Editor (http://ace.c9.io/)

2548.5k5](/packages/nathancox-codeeditorfield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
