Allow Pick*Type to submit the form when selection an entity, and apply inside Event

This commit is contained in:
2023-11-28 12:35:19 +01:00
parent e902b6d409
commit 9b9c2774ad
10 changed files with 48 additions and 26 deletions

View File

@@ -101,7 +101,12 @@ final readonly class EventListController
]
);
$builder->add('person_id', PickPersonDynamicType::class, ['as_id' => true, 'multiple' => false]);
$builder->add('person_id', PickPersonDynamicType::class, [
'as_id' => true,
'multiple' => false,
'submit_on_adding_new_entity' => true,
'label' => 'Add a participation',
]);
$builder->add('event_id', HiddenType::class, [
'data' => $event->getId(),