fullscreeninteractive/silverstripe-dropdownimagefield

Dropdown field with image support for SilverStripe CMS

Installs: 1 532

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 6

Language:JavaScript

Type:silverstripe-vendormodule

1.0.0 2016-10-15 22:32 UTC

This package is auto-updated.

Last update: 2024-09-30 04:14:12 UTC


README

Adds a DropdownImageField field which enables you to display images alongside the captions. Uses a plugin for Chosen.js (which is used by SS), Image-Select. The plugin is modified.

Working screenshot

Requirements

SilverStripe 4.0+

Usage

Example:

DropdownImageField::create('LanguageID', 'Select language',
	LanguageObj::get(), // Source for items.
	'ID',		// Key field on item.
	'Title',	// Caption field on item.
	'Icon'		// Image field on item. Can be a method/relation that returns an image.
)

Notes

This plugin uses a setTimeout function with additional parameters. A polyfill is loaded to support IE9 and lower.