2017 © Pedro Peláez
 

silverstripe-module silverstripe-multivaluefield

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

image

symbiote/silverstripe-multivaluefield

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

  • Thursday, July 26, 2018
  • by symbiote
  • Repository
  • 12 Watchers
  • 43 Stars
  • 33,077 Installations
  • PHP
  • 28 Dependents
  • 0 Suggesters
  • 37 Forks
  • 5 Open issues
  • 46 Versions
  • 30 % Grown

The README.md

SilverStripe MultiValueField module

Build Status SilverStripe supported module, (*1)

Notes:, (*2)

  • 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, (*3)

  • 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., (*4)

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., (*5)

Version info

This version of MultiValueField supports SilverStripe 4.0.0, (*6)

Older versions of SilverStripe are supported on minor version branches below, (*7)

Installation

composer require symbiote/silverstripe-multivaluefield

Basic Usage

As with all DB fields, (*8)

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

To make use of the field on the frontend, you can loop over the Items property, (*9)

<% loop $Keywords.Items %>
    <p>$Key $Value</p>
<% end_loop %>

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., (*10)

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

Maintainer Contacts

Requirements

  • SilverStripe 4.0

Contributing

Thanks

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., (*12)

Please use https://www.transifex.com/projects/p/silverstripe-multivaluefield to contribute translations, rather than sending pull requests with YAML files., (*13)

License

This module is licensed under the BSD license at http://silverstripe.org/BSD-license, (*14)

The Versions

26/07 2018

3.x-dev

3.9999999.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

26/07 2018

3.1.x-dev

3.1.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

26/07 2018

3.1.0

3.1.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

18/06 2018

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe dbfield formfield

21/03 2018

5.0.1

5.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe dbfield formfield

21/03 2018

dev-fix-empty-array

dev-fix-empty-array

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe dbfield formfield

02/02 2018

2.4.x-dev

2.4.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

10/01 2018

3.0.3

3.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe dbfield formfield

09/01 2018

3.0.x-dev

3.0.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

09/01 2018

3.0.2

3.0.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

09/01 2018

3.0.4

3.0.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

12/12 2017

2.4.3

2.4.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

20/11 2017

3.0.1

3.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

10/11 2017

5.0.0

5.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe dbfield formfield

13/10 2017

2.3.x-dev

2.3.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

13/10 2017

2.2.x-dev

2.2.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

13/10 2017

2.1.x-dev

2.1.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

13/10 2017

2.0.x-dev

2.0.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

28/09 2017

1.0.x-dev

1.0.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

28/08 2017

3.0.0

3.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

13/07 2017

4.0.3

4.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

05/07 2017

2.4.2

2.4.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

30/06 2017

2.4.1

2.4.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

30/06 2017

4.0.2

4.0.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

29/06 2017

4.0.1

4.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

23/06 2017

4.0.0

4.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

21/02 2017

2.3.3

2.3.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

21/02 2017

2.4.0

2.4.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

26/07 2016

2.3.2

2.3.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

15/07 2016

2.3.1

2.3.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

13/07 2016

2.3.0

2.3.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

19/05 2016

2.2.4

2.2.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

15/03 2016

2.2.3

2.2.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

04/02 2016

2.2.2

2.2.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

20/11 2015

2.2.1

2.2.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

02/11 2015

2.2.0

2.2.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

20/08 2015

2.1.1

2.1.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

02/07 2015

2.1.0

2.1.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

18/05 2015

2.0.6

2.0.6.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

23/02 2015

2.0.5

2.0.5.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

03/01 2015

2.0.4

2.0.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

21/08 2014

2.0.3

2.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

24/01 2014

2.0.2

2.0.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

10/11 2013

2.0.1

2.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

10/11 2013

2.0.1-rc1

2.0.1.0-RC1

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield

30/10 2013

2.0.0

2.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe dbfield formfield