diff --git a/src/Form/ParticipantType.php b/src/Form/ParticipantType.php index ea288d9..ae6576c 100644 --- a/src/Form/ParticipantType.php +++ b/src/Form/ParticipantType.php @@ -323,9 +323,10 @@ class ParticipantType extends AbstractType } // forcibly select mandatory services that potentially have been disabled in PRE_SET_DATA - $mandatoryServices = array_filter($options['selectable_services'], function (Service $service) use ($data) { + $mandatoryServices = array_filter($options['selectable_services'], function (Service $service) use ($form) { + $participantIndex = $form->getData()->index; return true === $service->mandatory || - (Service::SOURCE_BOOKING === $service->source && in_array($data['index'], $service->mapping)); + (Service::SOURCE_BOOKING === $service->source && in_array($participantIndex, $service->mapping)); }); if (0 < count($mandatoryServices)) {