1 <?php
2 3 4 5 6 7 8
9
10 class EditableRadioField extends EditableMultipleOptionField {
11
12 static $singular_name = 'Radio field';
13
14 static $plural_name = 'Radio fields';
15
16 function getFormField() {
17 $optionSet = $this->Options();
18 $options = array();
19
20 if($optionSet) {
21 foreach( $optionSet as $option ) {
22 $options[$option->Title] = $option->Title;
23 }
24 }
25
26 return new OptionsetField($this->Name, $this->Title, $options);
27 }
28 }
[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.
-