I\'ve got two forms in a same page.
My problem is when I tried to submit a form, it\'s like it tried to submit the second form below in the page as well.
As
This is how I handle them on my controller :
return $this->render('SgaDemandeBundle:Demande:suivi_avancement.html.twig',
array('form' => $form->createView(),
........
'update' => $formModification->createView()));
This is the html for the second form :
<div class="well">
<form method="post">
<div id="form">
<div>
<button type="submit" id="form_modification"
name="form[modification]">Modification done
</button>
</div>
<input type="hidden" id="form__token" name="form[_token]"
value="fFjgI4ecd1-W70ehmLHmGH7ZmNEHAMqXlY1WrPICtK4">
</div>
</form>
</div>
This is my twig rendered :
<div class="well">
<form method="post" {{form_enctype(update)}} >
{{ form_widget(update) }}
</form>
</div>
<div class="well">
<form method="post" action='' {{form_enctype(form)}} >
{{ form_widget(form) }}
<input type="submit" class="btn btn-primary"/>
</form>
<div class='errors'>
{{ form_errors(form) }}
</div>
</div>
I hope this will help you.