fix: don't submit data of removed fields

This commit is contained in:
Björn Fromme
2026-03-16 11:59:10 +01:00
parent 9eeed7f992
commit 3d9fc18a83
3 changed files with 9 additions and 27 deletions
@@ -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);
}