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
You have to treat the forms separately:
if('POST' === $request->getMethod()) {
if ($request->request->has('form1name')) {
// handle the first form
}
if ($request->request->has('form2name')) {
// handle the second form
}
}
This is perfectly explained in Symfony2 Multiple Forms: Different From Embedded Forms (temporarily unavailable - see below)
As the link provided above is temporarily unavailable, you can see an archive of that resource here.