title: How can I set the form name with Symfony formbuilder?
body: <p>I am creating a form with Symfony formbuilder:</p>
  
  <pre><code>$options =  [
       'attr'   =&gt; array('class' =&gt; 'form-control',),
       'data' =&gt; $data,
         ];
  
   $formBuilder-&gt;add($name, $class, $options);
  </code></pre>
  
  <p>When I look now at my form then the field looks like this:</p>
  
  <pre><code>&lt;input name="form[color]" value="#c651a8" class="form-control"&gt;
  </code></pre>
  
  <p>But I want to replace <code>form[color]</code> with <code>12345</code>. The result I like to have is:</p>
  
  <pre><code>&lt;input name="12345" value="#c651a8" class="form-control"&gt;
  </code></pre>
  
  <p>I tried different things like for example:</p>
  
  <pre><code>  $options =  [
             'attr'   =&gt; array('class' =&gt; 'form-control','name' =&gt; '12345',),
             'data' =&gt; $data,
             ];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  $options =  [
             'attr'   =&gt; array('class' =&gt; 'form-control'),
             'name' =&gt; '12345',
             'data' =&gt; $data,
             ];
  </code></pre>
  
  <p>But I could not find a solution.</p>