diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php index 568ce03d27..043e583244 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php @@ -46,11 +46,6 @@ class UserOptionCategoryAddForm extends AbstractFormBuilderForm */ public $objectEditLinkController = UserOptionCategoryEditForm::class; - /** - * @inheritDoc - */ - public $additionalFields = ['parentCategoryName' => 'profile']; - #[\Override] protected function createForm() { @@ -102,6 +97,16 @@ function (IFormDocument $document, array $data, IStorableObject $object) { ); } + #[\Override] + public function save() + { + if ($this->formAction === 'create') { + $this->additionalFields['parentCategoryName'] = 'profile'; + } + + parent::save(); + } + #[\Override] public function saved() {