title: Symfony2 Two actions in one form
body: <p>I'm learning Symfony2 and here is my problem.</p>
  
  <p>I have created a form with an other one embed in the first one. The thing is I would like to make a submit button for the both part with different actions. I'd like to knonw if it's possible the way I'm trying to do it?</p>
  
  <p>Here is my Form:</p>
  
  <p>
  
  <pre><code>class creaGrpType extends AbstractType
  {
      private $codeEtapeList;
  
      public function __construct(array $codeEtapeListFromController)
      {
          $this-&gt;codeEtapeList = $codeEtapeListFromController;
      }
  
      public function buildForm(FormBuilder $builder, array $options)
      {
          $builder
          -&gt;add('codeEtape', 'choice', array(
              'choices'   =&gt; $this-&gt;codeEtapeList,
              'required'  =&gt; false))
          -&gt;add('listeStudents', new CreaGrp2Type);
  
      }
  </code></pre>
  
  <p>and here is my TWIG:</p>
  
  <p>
  
  <pre><code>&lt;form method="post" {{ form_enctype(formCreaGrp) }}&gt;
  
      &lt;table&gt;         
                  &lt;tr&gt;
              &lt;td&gt;
              {{ form_label(formCreaGrp.codeEtape, "Année d'étude:") }}
                          {{ form_errors(formCreaGrp.codeEtape) }}
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                          {{ form_widget(formCreaGrp.codeEtape) }}
              &lt;input action = "{{ path('EnsgtiEnsgtiBundle_refreshListe')}}" type="submit" value="Rafraichir la liste des étudiants"&gt;
      &lt;/form&gt;&lt;hr&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
              &lt;form method="post" {{ form_enctype(formCreaGrp) }}&gt;
              {{ form_label(formCreaGrp.listeStudents, "Choisir les membres du groupe:") }}
              {{ form_errors(formCreaGrp.listeStudents) }}
              {{ form_widget(formCreaGrp.listeStudents) }}
              &lt;input action = "{{ path('EnsgtiEnsgtiBundle_creaGrp2')}}" type="submit"/&gt;
              &lt;/form&gt;
              &lt;/td&gt;
          &lt;/tr&gt;&lt;hr&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  </code></pre>