-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #3436 [Reference][Form Types] Add missing docs for "action" a…
…nd "method" option (bicpi) This PR was merged into the 2.3 branch. Discussion ---------- [Reference][Form Types] Add missing docs for "action" and "method" option | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | 2.3+ | Fixed tickets | #3410 I'm not sure of adding these two options as separate rst-files because I don't think they will get listed as `inherited` options. But no other options are embedded directly. Please let me know if I can improve that. Commits ------- 793c8a0 Add note about the PATCH method 4555495 Update note wording for "method" option 70ca6da Improvements after review cecc762 Update "method" description a636945 Fixes after review 83ff4b1 Improve descriptions 1bf3ce0 [Reference][Form Types] Add missing docs for "action" and "method" option
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. versionadded:: 2.3 | ||
The ``action`` option was introduced in Symfony 2.3. | ||
|
||
action | ||
~~~~~~ | ||
|
||
**type**: ``string`` **default**: empty string | ||
|
||
This option specifies where to send the form's data on submission (usually an | ||
URI). Its value is rendered as the ``action`` attribute of the ``form`` | ||
element. An empty value is considered a same-document reference, i.e. the form | ||
will be submitted to the same URI that rendered the form. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. versionadded:: 2.3 | ||
The ``method`` option was introduced in Symfony 2.3. | ||
|
||
method | ||
~~~~~~ | ||
|
||
**type**: ``string`` **default**: ``POST`` | ||
|
||
This option specifies the HTTP method used to submit the form's data. Its | ||
value is rendered as the ``method`` attribute of the ``form`` element and is | ||
used to decide whether to process the form submission in the | ||
``handleRequest()`` method after submission. Possible values are: | ||
* POST | ||
* GET | ||
* PUT | ||
* DELETE | ||
* PATCH | ||
.. note: | ||
When the method is PUT, PATCH, or DELETE, Symfony will automatically | ||
render a ``_method`` hidden field in your form. This is used to "fake" | ||
these HTTP methods, as they're not supported on standard browsers. For | ||
more information, see :doc:`/cookbook/routing/method_parameters`. | ||
|
||
.. note: | ||
|
||
Only the PATCH method allows submitting partial data without that missing | ||
fields are set to ``null`` in the underlying data (preserving default | ||
values, if any). |