Index of /multiselectfield/
Name | Last Modified | Size |
---|---|---|
Parent Directory | ||
javascript | 2014-03-04 07:23 | - |
css | 2014-03-04 07:23 | - |
code | 2015-10-08 19:41 | - |
_config.php | 2009-10-16 07:27 | 1k |
MultiSelectField
----------------
A field primarily for managing has_many and many_many relationships, but should
also work with Varchar fields.
Presents an interface composed of two listboxes with add/remove buttons to move
items from one box to the other. Sometimes refered to as an "options transfer"
field.
Code has now been rewritten to make it more portable:
- Extends standard SilverStripe CheckboxSetField and inherits it's constructor
- Degrades to a standard <select multiple="multiple"> field without javascript
Example use:
static $many_many = array ('ThingPages'=>'ThingPage');
$source = DataObject::get('ThingPages);
new MultiSelectField(
"ThingPages", // Relationship
"Related Thing Pages", // Field name
$source->toDropdownMap('ID','Title') // Source records (array)
)
Proudly Served by LiteSpeed Web Server at www.resense.co.nz Port 80