diff --git a/code/Model/EditableFormField.php b/code/Model/EditableFormField.php index 08d2dd2..ed1ee19 100755 --- a/code/Model/EditableFormField.php +++ b/code/Model/EditableFormField.php @@ -318,14 +318,14 @@ class EditableFormField extends DataObject // Validation $validationFields = $this->getFieldValidationOptions(); if ($validationFields && $validationFields->count()) { - $fields->addFieldsToTab('Root.Validation', $validationFields); + $fields->addFieldsToTab('Root.Validation', $validationFields->toArray()); $fields->fieldByName('Root.Validation')->setTitle(_t(__CLASS__.'.VALIDATION', 'Validation')); } // Add display rule fields $displayFields = $this->getDisplayRuleFields(); if ($displayFields && $displayFields->count()) { - $fields->addFieldsToTab('Root.DisplayRules', $displayFields); + $fields->addFieldsToTab('Root.DisplayRules', $displayFields->toArray()); } // Placeholder diff --git a/code/UserForm.php b/code/UserForm.php index 20ec7e8..7f3c2b5 100644 --- a/code/UserForm.php +++ b/code/UserForm.php @@ -234,9 +234,9 @@ trait UserForm ->getComponentByType(GridFieldDetailForm::class) ->setItemRequestClass(UserFormRecipientItemRequest::class); - $fields->addFieldsToTab('Root.FormOptions', $onCompleteFieldSet); + $fields->addFieldToTab('Root.FormOptions', $onCompleteFieldSet); $fields->addFieldToTab('Root.Recipients', $emailRecipients); - $fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions()); + $fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions()->toArray()); $submissions = $this->getSubmissionsGridField(); $fields->findOrMakeTab('Root.Submissions')->setTitle(_t('SilverStripe\\UserForms\\Model\\UserDefinedForm.SUBMISSIONS', 'Submissions'));