diff --git a/code/model/editableformfields/EditableCheckboxGroupField.php b/code/model/editableformfields/EditableCheckboxGroupField.php index f98faf3ab..8bcdaa183 100755 --- a/code/model/editableformfields/EditableCheckboxGroupField.php +++ b/code/model/editableformfields/EditableCheckboxGroupField.php @@ -22,7 +22,7 @@ public function getFormField() // 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 a576c1a1b..b3a8b8eb7 100755 --- a/code/model/editableformfields/EditableDropdown.php +++ b/code/model/editableformfields/EditableDropdown.php @@ -38,7 +38,7 @@ public function getFormField() // 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 5062ec25c..74e6a8203 100644 --- a/code/model/editableformfields/EditableOption.php +++ b/code/model/editableformfields/EditableOption.php @@ -75,12 +75,16 @@ public function canDelete($member = null) 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 745c75793..e51295c73 100755 --- a/code/model/editableformfields/EditableRadioField.php +++ b/code/model/editableformfields/EditableRadioField.php @@ -34,7 +34,7 @@ public function getFormField() // Set default item $defaultOption = $this->getDefaultOptions()->first(); if ($defaultOption) { - $field->setValue($defaultOption->EscapedTitle); + $field->setValue($defaultOption->Value); } $this->doUpdateFormField($field); return $field;