title: other in entity choice list form
body: <p>I'm new to symfony. I have a drop down in a form with data fetched from DB.</p>
  
  <pre><code>$builder-&gt;add('category', 'entity', array(
          'label' =&gt; 'category',
          'class' =&gt; 'MyBundle:category',
          'expanded' =&gt; false,
          'multiple' =&gt; false,
          'mapped' =&gt; false,
          'empty_value' =&gt; 'category'
      ));
  
      $builder-&gt;add('other_category', 'text', array(
          'label' =&gt; 'category',
          'required' =&gt; false,
          'invalid_message' =&gt; 'Please enter a valid category',
          'mapped' =&gt; false,
      ));
  </code></pre>
  
  <p>the user can also add new category to the table. when other is selected from drop down, the 'other_category' input field is shown, else its hidden. 
  'Other' was added to drop down with the help of this code.</p>
  
  <pre><code>public function finishView(FormView $view, FormInterface $form, array $options)
  {
      $new_choice = new ChoiceView(array(), 'other', 'Other');
      $view-&gt;children['category']-&gt;vars['choices'][] = $new_choice;
  }
  </code></pre>
  
  <p>If a option is selected from drop down the form works fine. Data gets stored without any error. But if user selects 'other' and enters a new category the page reloads with 'This value is no valid' under the category options and there is no form validation for the 'other_category' entered by user.</p>
  
  <p>Can someone help me with the form validation and also entering of a new category or suggest a better way to implement the above functionality.</p>