diff --git a/code/FormField/UserFormsCheckboxSetField.php b/code/FormField/UserFormsCheckboxSetField.php index 43fb595d0..6338ff831 100644 --- a/code/FormField/UserFormsCheckboxSetField.php +++ b/code/FormField/UserFormsCheckboxSetField.php @@ -47,7 +47,7 @@ public function getOptions() public function getValueForValidation(): mixed { - $value = $this->Value(); + $value = $this->getValue(); if (is_iterable($value) || is_null($value)) { return $value; } diff --git a/templates/SilverStripe/UserForms/FormField/UserFormsCheckboxSetField.ss b/templates/SilverStripe/UserForms/FormField/UserFormsCheckboxSetField.ss index 52e691e9f..34400836d 100644 --- a/templates/SilverStripe/UserForms/FormField/UserFormsCheckboxSetField.ss +++ b/templates/SilverStripe/UserForms/FormField/UserFormsCheckboxSetField.ss @@ -1,7 +1,7 @@ <% if $Options.Count %> <% loop $Options %>
- + checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> $Top.getValidationAttributesHTML().RAW /> diff --git a/templates/SilverStripe/UserForms/FormField/UserFormsOptionSetField.ss b/templates/SilverStripe/UserForms/FormField/UserFormsOptionSetField.ss index 85eb9f15e..a220dc016 100644 --- a/templates/SilverStripe/UserForms/FormField/UserFormsOptionSetField.ss +++ b/templates/SilverStripe/UserForms/FormField/UserFormsOptionSetField.ss @@ -1,6 +1,6 @@ <% loop $Options %>
- + checked<% end_if %><% if $isDisabled %> disabled<% end_if %> <% if $Up.Required %>required<% end_if %> $Top.getValidationAttributesHTML().RAW /> diff --git a/templates/SilverStripe/UserForms/Model/EditableFormField/EditableDropdown.ss b/templates/SilverStripe/UserForms/Model/EditableFormField/EditableDropdown.ss index cf2d5e1f9..462f4ca50 100644 --- a/templates/SilverStripe/UserForms/Model/EditableFormField/EditableDropdown.ss +++ b/templates/SilverStripe/UserForms/Model/EditableFormField/EditableDropdown.ss @@ -1,5 +1,5 @@ diff --git a/templates/SilverStripe/UserForms/Model/EditableFormField/EditableTextareaField.ss b/templates/SilverStripe/UserForms/Model/EditableFormField/EditableTextareaField.ss index 790f73da5..fc24f9151 100644 --- a/templates/SilverStripe/UserForms/Model/EditableFormField/EditableTextareaField.ss +++ b/templates/SilverStripe/UserForms/Model/EditableFormField/EditableTextareaField.ss @@ -1 +1 @@ - + diff --git a/tests/php/Model/EditableFormField/EditableCountryDropdownFieldTest.php b/tests/php/Model/EditableFormField/EditableCountryDropdownFieldTest.php index 4426ead80..cfbb85d41 100644 --- a/tests/php/Model/EditableFormField/EditableCountryDropdownFieldTest.php +++ b/tests/php/Model/EditableFormField/EditableCountryDropdownFieldTest.php @@ -38,7 +38,7 @@ public function testDefaultValue() /** @var EditableCountryDropdownField $field */ $field = EditableCountryDropdownField::create(); $field->Default = 'nz'; - $this->assertEquals($field->getFormField()->Value(), 'nz'); + $this->assertEquals($field->getFormField()->getValue(), 'nz'); } public function testEmptyDefaultValue()