2017 © Pedro Peláez
 

silverstripe-module silverstripe-multiselectfield

A FormField for users to select and remove multiple items to a record

image

fullscreeninteractive/silverstripe-multiselectfield

A FormField for users to select and remove multiple items to a record

  • Wednesday, February 3, 2016
  • by wilr
  • Repository
  • 2 Watchers
  • 6 Stars
  • 2,655 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 1 Versions
  • 16 % Grown

The README.md

MultiSelectField

This is a fork of the http://svn.gpmd.net/svn/open/multiselectfield/tags/0.2/ 
which has been updated for 3.1. 

Maintainer Contact

Requirements

  • SilverStripe 3.1

Overview

Example, (*1)

A FormField for users to select and remove multiple items to a record. Similar to CheckboxSetField this handles both adding and removing entries backed by relations (has_many, many_many) and saving text strings as comma separated list., (*2)

Installation

composer require "fullscreeninteractive/silverstripe-multiselectfield:dev-master"

Usage Overview

Relation

private static $many_many = array (
    'Departments' => 'Department'
);

..

$fields->push(new MultiSelectField(
    "Departments",
    "Departments",
    Departments::get()->map('ID', 'Title')
));

Comma separated list

private static $db = array (
    'Departments' => 'Text'
);

..

$fields->push(new MultiSelectField(
    "Departments",
    "Departments",
    array(
        'Design',
        'Development',
        'HR'
    )
));

The Versions

03/02 2016

dev-master

9999999-dev

A FormField for users to select and remove multiple items to a record

  Sources   Download

The Requires

 

silverstripe formfield multiselects listboxfield