Download the PHP package dft/silverstripe-frontend-multiselectfield without Composer
On this page you can find all versions of the php package dft/silverstripe-frontend-multiselectfield. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dft/silverstripe-frontend-multiselectfield
More information about dft/silverstripe-frontend-multiselectfield
Files in dft/silverstripe-frontend-multiselectfield
Package silverstripe-frontend-multiselectfield
Short Description A Silverstripe image gallery allowing multi image upload and automatic generation of thumbnail gallery with popups
License BSD-3-Clause
Homepage http://github.com/Dean-Forest-Tech/silverstripe-frontend-multiselectfield
Informations about the package silverstripe-frontend-multiselectfield
Silverstripe Frontend Multi Select Field
If you find this module helpful, please consider dropping us a donation via GitHub sponsors.
With the move to React components in Silverstripe 4 and 5, it gets harder to load admin components into the frontend of your site.
This module adds ListBox
style functionality to frontend forms using a wrapper around a basic select(DropdownField
) elements that adds functionality and styling from the multi-select-dropdown by codeshackio. More info on this project can be found here: https://codeshack.io/multi-select-dropdown-html-javascript/
Installation
Install this module via composer:
compose require dft/silverstripe-frontend-multiselectfield
Adding to a form
Just add this field to your frontend form like you would any other field, for example:
Configuring
This field supports some configuration out of the box:
require_client
(default true
): By default, this field injects some javascript and CSS into your site to style this field. If you want to add this JS and CSS to your own theme's bundle, you can disable this feature by using Silverstripe's global config:
search
(default true
): By default this field loads a search form to filter possible values. You can disable the search form by setting setSearch
to false (this can be done on a field by field bases) when you load the field:
select_all
(default true
): By default this field adds a "select all" button. You can disable this by setting setSelectAll
to false (this can be done on a field by field bases) when you load the field:
limit
(default 0): Limit allows you to limit the number of items that can be selected. By default this is disabled (set to 0), if you want to limit the number of items, you can use: