Skip to content

Commit 76959a5

Browse files
committed
minor #18193 Adding more details on action and method (ThomasLandauer)
This PR was merged into the 5.4 branch. Discussion ---------- Adding more details on `action` and `method` Commits ------- 09d44cb Adding more details on `action` and `method`
2 parents 00fd25c + 09d44cb commit 76959a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

forms.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,9 @@ Set the ``label`` option on fields to define their labels explicitly::
755755
Changing the Action and HTTP Method
756756
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
757757

758-
By default, a form will be submitted via an HTTP POST request to the same
759-
URL under which the form was rendered. When building the form in the controller,
758+
By default, the ``<form>`` tag will be rendered with a ``method="post"`` attribute,
759+
and no ``action`` attribute, causing it to be submitted via an HTTP POST request to the same
760+
URL under which it was rendered. When building the form,
760761
use the ``setAction()`` and ``setMethod()`` methods to change this::
761762

762763
// src/Controller/TaskController.php

0 commit comments

Comments
 (0)