title: How to add data transformer inside a event listener
body: <p>So, here's my problem: I have to add a field to a form based on it's underlying data but i've to add a data transformer to the field.</p>
  
  <p>I thought the solution will be simple, just add a PRE_SET_DATA event listener to the form (just to access to the underlying data) and add the field and the transformer inside the listener. But i can't add the transformer inside the listener because the form is already locked.</p>
  
  <p>I´ve tried many workarounds but i couldn't solved it. Her's my code:</p>
  
  <pre><code>$builder-&gt;...
      -&gt;add(
          $builder-&gt;create('date', 'choice', array(
              'label' =&gt; 'form.game.date',
              'empty_value' =&gt; 'form.game.date',
              'required' =&gt; false,
              'choices' =&gt; array(
                  '2014-04-10' =&gt; '10/Apr', // just to test
                  '2014-04-11' =&gt; '11/Apr',
                  )
              ))
              -&gt;addModelTransformer(new DateToStringTransformer())
          );
  
  $builder-&gt;addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder) {
      $game = $event-&gt;getData();
      $form = $event-&gt;getForm();
  
      $period = new \DatePeriod(
          $game-&gt;getTournament()-&gt;getBeginDate(),
          new \DateInterval('P1D'),
          $game-&gt;getTournament()-&gt;getEndDate()-&gt;add(new \DateInterval('P1D'))
      );
  
      $dates = array();
  
      foreach($period as $date){
          $dates[$date-&gt;format("Y-m-d")] = $date-&gt;format("j/M");
      }
  
      $form-&gt;add('date', 'choice', array(
          'label' =&gt; 'form.game.date',
          'choices' =&gt; $dates,
          ));
  });
  </code></pre>
  
  <p>When i add the date field to the form inside event listener, the previously added data field is replaced so it's data transformer...</p>
  
  <p>Is there a way to do it?</p>