fix: don't submit data of removed fields

This commit is contained in:
Björn Fromme committed 2025-10-04 18:08:11 +02:00
1 parent fc93b28af0
commit 3edf5a80aa
3 files changed
+9 -27

No files matched your search

@@ -294,7 +294,9 @@ class ParticipantFieldHandlerRegistry
{
// Sync fields for all registered handlers
foreach ($this->handlers as $fieldName => $handler) {
if (property_exists($participant, $fieldName)) {
// Only sync fields that were in the original submission
// This prevents adding extra fields that would cause validation errors
if (property_exists($participant, $fieldName) && array_key_exists($fieldName, $participantData)) {
$dtoValue = $participant->{$fieldName};
$participantData[$fieldName] = $this->convertDtoValueToSubmittedFormat($dtoValue);
}