Symfony – Form not redirecting to action specified in form

I’m trying to make a form, which I self-defined the action like this in my controller:

$form = $this->createForm(ProgrammeSearchType::class, $search, [
    'action' => $this->generateUrl('recherche_programme'),
    'method' => 'GET',

But, the form rendered in the view look like this:

<form id="myForm">

So.. there is a problem. Why “action” is not specified in the HTML while I defined it into the controller.


Symfony doc:

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *