I want to have a multi select drop down menu so the Admin user can choose to show certain individuals on any Page.
page.php getCMSFields code
// get all existing individuals
$individuals = DataObject::get('Individual');
if (!empty($individualss)) {
// create an array('ID'=>'Name')
$map = $individuals->toDropdownMap('ID', 'FullName');
// create a Checkbox group based on the array
$fields->addFieldToTab('Root.IntroPanel',
new CheckboxSetField(
$name = "Individuals",
$title = "Select Contacts",
$source = $map
));
I think this needs to be differnt in silverstripe3
$map = $individuals->toDropdownMap('ID', 'FullName');
I was thinking if this isn't posible maybe i could create a shortcode, but a shortcode would not be easier for the admin user.