Skip to content

Commit

Permalink
Merge pull request #1 from webcoast-dk/bugfix/return-array-value-for-…
Browse files Browse the repository at this point in the history
…select-fields

[BUGFIX] Return array value for select fields
  • Loading branch information
thommyhh authored Aug 19, 2024
2 parents a4bd08d + 709df2f commit 483bc26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Form/FormDataProvider/DotFormsDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 483bc26

Please sign in to comment.