title: Symfony form do not submit data - POST request is empty
body: <p>I am new to symfony and twig templates and I am struggling with a problem of submiting data using form created by formbuilder in Symfony. Clicking "create" button does not submit data. I created a template addEmployee.html.twig which is extending base template with navbar and sidebar.</p>
  
  <p><strong>I noticed that this form works only if I am not extending base.</strong> So it will create proper request and submit the form only if the template in which the form is created doesnt have any parent template.</p>
  
  <p>I dont know why extending base.html.twig template causing loosing of the request and I have no idea how to get it work with extending templates I have already builded.  </p>
  
  <p>newEmployee Function from MainController.php</p>
  
  <pre class="lang-php prettyprint-override"><code>  /**
       * @Route("/employee/add", name="add_employee")
       * @Method({"GET","POST"})
       */
      public function newEmployee(Request $request){
  
  
        $employee = new Employee();
  
        $form = $this-&gt;createFormBuilder($employee)
            -&gt;setMethod('POST')
            -&gt;add('employeeNumber',TextType::class, array('attr' =&gt; array('class'=&gt;'form-control')))
            -&gt;add('name',TextType::class, array('attr' =&gt; array('class'=&gt;'form-control')))
            -&gt;add('phone',TextType::class, array('attr' =&gt; array('class'=&gt;'form-control')))
            -&gt;add('pool',TextType::class, array('attr' =&gt; array('class'=&gt;'form-control')))
            -&gt;add('save',SubmitType::class, array('label'=&gt;'Create','attr'=&gt;array('class'=&gt; 'btn btn-primary mt-3')))
            -&gt;getForm();
  
            if ($request-&gt;isMethod('POST')) {
              $form-&gt;submit($request-&gt;request-&gt;get($form-&gt;getName()));
            }
  
  
        if($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()){
  
            $employee=$form-&gt;getData();
  
            $entityManager= $this-&gt;getDoctrine()-&gt;getManager();
            $entityManager-&gt;persist($employee);
            $entityManager-&gt;flush();
  
            return $this-&gt;redirectToRoute('homepage');
        }
  
            return $this-&gt;render('/Employee/addEmployee.html.twig',array('form'=&gt;$form-&gt;createView()));
  
    }
  </code></pre>
  
  <p>addEmployee.html.twig'</p>
  
  <pre><code>{% extends 'base.html.twig' %}
  
  {% block title%} New Article{% endblock %}
  
  {% block body%}
  
  {{form_start(form)}}
  {{form_widget(form)}}
  {{form_end(form)}}
  
  {% endblock %}
  
  </code></pre>
  
  <p>base.html.twig</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;{% block title %}TL Manage{% endblock %}&lt;/title&gt;        
          {% block stylesheets %}
          &lt;link rel="stylesheet" href="https://bootswatch.com/4/cosmo/bootstrap.min.css"&gt;
          &lt;link rel="stylesheet" href="../css/style.css"&gt;
          {% endblock %}
      &lt;/head&gt;
      &lt;body&gt;
  
      {% include 'inc/navbar.html.twig' %}
      {% include  'inc/sidebar.html.twig' %}
       &lt;div id="content"&gt;
              {% block body %}{% endblock %}
       &lt;/div&gt;
  
      {% block javascript %}
      &lt;!-- Icons.JS --&gt;
      &lt;script src="https://unpkg.com/ionicons@4.5.5/dist/ionicons.js"&gt;&lt;/script&gt;
      &lt;!-- JQUERY --&gt;
      &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;!-- Popper.JS --&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;!-- Bootstrap JS --&gt;
      &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;!-- jQuery Custom Scroller CDN --&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/main.js"&gt;&lt;/script&gt;
       {% endblock %}
      &lt;/body&gt;
  &lt;/html&gt;
  
  </code></pre>
  
  <p>Instead of redirecting to homepage and inserting data 
  <a href="https://i.stack.imgur.com/kkC3K.png" rel="nofollow noreferrer">this is what happenes if I submit the form</a></p>
  
  <p>and after removing <code>{% extends 'base.html.twig' %}</code> from addEmployee.html.twig' form works as intended. Any ideas how to get it work with the rest of the ui parts? </p>