1 <?php
2 3 4 5 6 7 8
9
10 class EditableDropdown extends EditableMultipleOptionField {
11
12 static $singular_name = 'Dropdown Field';
13
14 static $plural_name = 'Dropdowns';
15
16 17 18
19 function getFormField() {
20 $optionSet = $this->Options();
21 $options = array();
22
23 if($optionSet) {
24 foreach($optionSet as $option) {
25 $options[$option->Title] = $option->Title;
26 }
27 }
28
29 return new DropdownField($this->Name, $this->Title, $options);
30 }
31 }
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-