Symfony 2.8 dynamic ChoiceType options
<p>in my project I have some forms with choice types with <strong>a lot</strong> of options.</p>

<p>So I decided to build an autocomplete choice type based on jquery autocomplete, which adds new <code>&lt;option&gt;</code> HTML elements to the original <code>&lt;select&gt;</code> on runtime. When selected they are submitted correctly, but can't be handled within the default <code>ChoicesToValuesTransformer</code>, since the don't exist in my form when I create it.</p>

<p>How can I make symfony accept my dynamically added values?</p>

<p>I found this answer <a href="https://stackoverflow.com/questions/12946461/validating-dynamically-loaded-choices-in-symfony-2#answer-28249516">Validating dynamically loaded choices in Symfony 2</a> , where the submitted values are used to modify the form on the <code>PRE_SUBMIT</code> form event, but couldn't get it running for my situation. I need to change choices known to the current type instead of adding a new widget to the form</p>