I'm overriding the forms on my Symfony app, but I surely skipped something in the process, but I do not know what.
Basically, it all works fine and looking as I want it to, but as soon as I purposely generate an error(i.e : changing email address to an invalid one), I am redirected to the lonely form template, instead of reloading to my page with the generated and displaying the problem.
I tried replacing this line :
return $this->render('@FOSUser/Profile/edit.html.twig', array(
'form' => $form->createView(),
));
from the ProfileController, as I think it is the reason, but I'm doing it wrong and getting errors when I try.
What would be the correct syntax to go my customized profile page that contains other forms, while displaying the errors of the submitted form ?