title: Symfony Form doesn't get values as it's supposed to
body: <p>I'm trying to build a form to post new "surveys", each consisting of a "title" and a set of "options", options are separate entities, and are linked to the Survey entity via a doctrine ManyToOne association.</p>
  
  <p>I am using a CollectionType to allow for dynamic creation of fields in the form. I am then using JQuery to create these additional forms dynamically.</p>
  
  <p>The problem is that once I try to submit the form, it submits only the "Survey" object, but not the "Option" objects. I know this because after querying for both, the "survey" is saved to the database, while the options aren't.</p>
  
  <p>The thing is, when I render the form as barebones as possible, without anything additional, and my jquery code just appends the "data-prototype", without any alteration, it works fine. The survey and the options are saved. I know this because I've tested it.</p>
  
  <p>After it worked, I decided to make the form slightly more presentable, and I must've screwed something up.</p>
  
  <p>Here's the rendered HTML of my form:
  <a href="https://pastebin.com/5UuTXy1F" rel="nofollow noreferrer">https://pastebin.com/5UuTXy1F</a></p>
  
  <p>Here's the relevant HTML, this is what a field looks like after it's been created by JQuery.</p>
  
  <pre><code>&lt;div class="survey_option"&gt;
      &lt;label&gt;1: &lt;/label&gt;
      &lt;input type="text" id="survey_options_0_title" name="survey[options][0][title]" required="required" maxlength="500"&gt;
      &lt;button type="button" class="remove_option_link"&gt;x&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>After writing something in each field and submitting it, the Options collection is empty.</p>
  
  <p>My question is then, why can't the form find the "options" during the form submission? Is it because it for some reason can't see the input, or because some of it's attributes are wrong? Is it because my javascript code is doing something stupid?</p>
  
  <p>And just in case, here is some other relevant code:
  The JQuery script which is used to dynamically add the fields: <a href="https://pastebin.com/KCdVK60q" rel="nofollow noreferrer">https://pastebin.com/KCdVK60q</a></p>
  
  <p>The SurveyOption form type: <a href="https://pastebin.com/uGe4rqCF" rel="nofollow noreferrer">https://pastebin.com/uGe4rqCF</a></p>
  
  <p>The Survey form type: <a href="https://pastebin.com/Zs4BEEKY" rel="nofollow noreferrer">https://pastebin.com/Zs4BEEKY</a></p>
  
  <p>And the controller function responsible for the form handling: <a href="https://pastebin.com/zrz0uJei" rel="nofollow noreferrer">https://pastebin.com/zrz0uJei</a></p>