title: How do I add an unbound field to a form in Symfony which is otherwise bound to an entity?
body: <p>Maybe I'm missing the obvious but how do I (or can I) add an extra "unbound" field to a Symfony form that is otherwise bound to an entity?</p>
  
  <p>Let's say I have an entity with fields <code>first_name</code> and <code>last_name</code>. I do the typical thing in my form class <code>buildForm</code> method.</p>
  
  <pre><code>$builder
      -&gt;add('first_name')
      -&gt;add('last_name')
  ;
  </code></pre>
  
  <p>and this in my controller:</p>
  
  <pre><code>$editForm = $this-&gt;createForm(new MyType(), $entity);
  </code></pre>
  
  <p>That works nicely but I'd like to add another text box, let's call it "extra", and receive the value in the POST action. If I do <code>$builder-&gt;add('extra')‍</code>, it complains that</p>
  
  <blockquote>
    <p>NoSuchPropertyException in PropertyAccessor.php line 479:</p>
    
    <p>Neither the property "extra" nor one of the methods "getExtra()", "extra()", "isExtra()", "hasExtra()", "__get()" exist and have public access in class...</p>
  </blockquote>
  
  <p>Which is correct. I just want to use it to collect some extra info from the user and do something with it other than storing it with the entity.</p>
  
  <p>I know how to make a completely standalone form but not one that's "mixed".
  Is this possible?</p>