From 347105b019a6a1d80932be57c9433ea17f9bdd93 Mon Sep 17 00:00:00 2001 From: Anna Dabrowska Date: Tue, 10 Sep 2024 19:40:39 +0200 Subject: [PATCH] Fix missing formId in some fieldsets --- src/FormGenerator/FormElementFactory.php | 2 +- src/FormGenerator/FormElements/FieldsetFormElement.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FormGenerator/FormElementFactory.php b/src/FormGenerator/FormElementFactory.php index 6608075..05ea63d 100644 --- a/src/FormGenerator/FormElementFactory.php +++ b/src/FormGenerator/FormElementFactory.php @@ -112,7 +112,7 @@ protected static function createFieldsetFormElement( string $formId = '', bool $formIsPersistent = false ): FieldsetFormElement { - $fieldsetFormElement = new FieldsetFormElement($id, $config, $parent); + $fieldsetFormElement = new FieldsetFormElement($id, $config, $parent, $formId); foreach ($config['children'] as $childId => $childConfig) { $childFormElement = self::createFormElement( diff --git a/src/FormGenerator/FormElements/FieldsetFormElement.php b/src/FormGenerator/FormElements/FieldsetFormElement.php index 6aa7c52..fa6133d 100644 --- a/src/FormGenerator/FormElements/FieldsetFormElement.php +++ b/src/FormGenerator/FormElements/FieldsetFormElement.php @@ -41,7 +41,7 @@ public function __construct( bool $formIsPersistent = false ) { unset($config['children']); // Children config not needed - parent::__construct($id, $config, $parent); + parent::__construct($id, $config, $parent, $formId, $formIsPersistent); } /**