diff --git a/code/model/editableformfields/EditableMultipleOptionField.php b/code/model/editableformfields/EditableMultipleOptionField.php index 7b3ef28..08ee2a4 100644 --- a/code/model/editableformfields/EditableMultipleOptionField.php +++ b/code/model/editableformfields/EditableMultipleOptionField.php @@ -40,7 +40,13 @@ class EditableMultipleOptionField extends EditableFormField { 'callback' => function($record, $column, $grid) { return TextField::create($column); } - ), + ), + 'Value' => array( + 'title' => _t('EditableMultipleOptionField.VALUE', 'Value'), + 'callback' => function($record, $column, $grid) { + return TextField::create($column); + } + ), 'Default' => array( 'title' => _t('EditableMultipleOptionField.DEFAULT', 'Selected by default?'), 'callback' => function($record, $column, $grid) { @@ -171,7 +177,7 @@ class EditableMultipleOptionField extends EditableFormField { */ protected function getOptionsMap() { $optionSet = $this->Options(); - $optionMap = $optionSet->map('EscapedTitle', 'Title'); + $optionMap = $optionSet->map('Value', 'Title'); if($optionMap instanceof SS_Map) { return $optionMap->toArray(); } diff --git a/code/model/editableformfields/EditableOption.php b/code/model/editableformfields/EditableOption.php index 16812f5..775733e 100644 --- a/code/model/editableformfields/EditableOption.php +++ b/code/model/editableformfields/EditableOption.php @@ -15,7 +15,8 @@ class EditableOption extends DataObject { "Name" => "Varchar(255)", "Title" => "Varchar(255)", "Default" => "Boolean", - "Sort" => "Int" + "Sort" => "Int", + "Value" => "Varchar(255)", ); private static $has_one = array(