diff --git a/modules/os2forms_sbsys/src/Element/WebformAttachmentSbsysXml.php b/modules/os2forms_sbsys/src/Element/WebformAttachmentSbsysXml.php index 70f080b6..b08fc042 100644 --- a/modules/os2forms_sbsys/src/Element/WebformAttachmentSbsysXml.php +++ b/modules/os2forms_sbsys/src/Element/WebformAttachmentSbsysXml.php @@ -241,15 +241,15 @@ protected static function getWebformElementsAsList(WebformSubmissionInterface $w } } else { - // For arrays (for example: composite elements), splitting values. + $elements_list[$field_name] = $data[$key]; + + // For arrays (for example: composite elements), + // values are aldo duplicated by splitting them. if (is_array($data[$key])) { foreach ($data[$key] as $child_key => $child_data) { $elements_list[$field_name . "_" . $child_key] = $child_data; } } - else { - $elements_list[$field_name] = $data[$key]; - } } } }