diff --git a/code/model/editableformfields/EditableCheckboxGroupField.php b/code/model/editableformfields/EditableCheckboxGroupField.php index bc02fc1..c36f7fa 100755 --- a/code/model/editableformfields/EditableCheckboxGroupField.php +++ b/code/model/editableformfields/EditableCheckboxGroupField.php @@ -24,7 +24,7 @@ class EditableCheckboxGroupField extends EditableMultipleOptionField // Set the default checked items $defaultCheckedItems = $this->getDefaultOptions(); if ($defaultCheckedItems->count()) { - $field->setDefaultItems($defaultCheckedItems->map('EscapedTitle')->keys()); + $field->setDefaultItems($defaultCheckedItems->map('Value')->keys()); } $this->doUpdateFormField($field); diff --git a/code/model/editableformfields/EditableDropdown.php b/code/model/editableformfields/EditableDropdown.php index 195bd4a..259a51b 100755 --- a/code/model/editableformfields/EditableDropdown.php +++ b/code/model/editableformfields/EditableDropdown.php @@ -62,7 +62,7 @@ class EditableDropdown extends EditableMultipleOptionField // Set default $defaultOption = $this->getDefaultOptions()->first(); if ($defaultOption) { - $field->setValue($defaultOption->EscapedTitle); + $field->setValue($defaultOption->Value); } $this->doUpdateFormField($field); return $field; diff --git a/code/model/editableformfields/EditableOption.php b/code/model/editableformfields/EditableOption.php index 5062ec2..74e6a82 100644 --- a/code/model/editableformfields/EditableOption.php +++ b/code/model/editableformfields/EditableOption.php @@ -75,12 +75,16 @@ class EditableOption extends DataObject return $this->canEdit($member); } + /** + * @deprecated 5.0 Use "$Title.XML" in templates instead + * @return string + */ public function getEscapedTitle() { return Convert::raw2att($this->Title); } - /** + /** * @param Member $member * @return bool */ diff --git a/code/model/editableformfields/EditableRadioField.php b/code/model/editableformfields/EditableRadioField.php index 1c4f5fd..2129bb4 100755 --- a/code/model/editableformfields/EditableRadioField.php +++ b/code/model/editableformfields/EditableRadioField.php @@ -34,7 +34,7 @@ class EditableRadioField extends EditableMultipleOptionField // Set default item $defaultOption = $this->getDefaultOptions()->first(); if ($defaultOption) { - $field->setValue($defaultOption->EscapedTitle); + $field->setValue($defaultOption->Value); } $this->doUpdateFormField($field); return $field;