I would like as for help. I have a form with dropdown list and I need to modify choices based on external input. I guess it should work well with eventListener
$builder->addEventListener(
FormEvents::PRE_SET_DATA,
function(FormEvent $event) use($input){
$form = $event->getForm();
// get existin form child
// modify list of choices
}
All samples I have seen are using FormEvents only to add new field, but I need to modify existing field but I don't know how to access it.
thanks for help