From 709df2f0f5ea45cab7bc33a640c23905a406b291 Mon Sep 17 00:00:00 2001 From: Thorben Nissen Date: Mon, 19 Aug 2024 10:20:56 +0200 Subject: [PATCH] [BUGFIX] Return array value for select fields --- Classes/Form/FormDataProvider/DotFormsDataProvider.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/Form/FormDataProvider/DotFormsDataProvider.php b/Classes/Form/FormDataProvider/DotFormsDataProvider.php index b5db090..3383538 100644 --- a/Classes/Form/FormDataProvider/DotFormsDataProvider.php +++ b/Classes/Form/FormDataProvider/DotFormsDataProvider.php @@ -26,6 +26,9 @@ public function addData(array $result): array } $currentArray = $currentArray[$fieldPart] ?? null; } + if ($fieldConfig['config']['type'] === 'select' && !is_array($currentArray)) { + $currentArray = $currentArray === null ? $result['databaseRow'][$fieldName] ?? [] : [$currentArray]; + } $result['databaseRow'][$fieldName] = $currentArray ?? $result['databaseRow'][$fieldName] ?? null; } }