-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Reference][Form Types] Add missing docs for "action" and "method" option #3436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
weaverryan
merged 7 commits into
symfony:2.3
from
bicpi:document_action_and_method_form_options
Mar 4, 2014
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1bf3ce0
[Reference][Form Types] Add missing docs for "action" and "method" op…
bicpi 83ff4b1
Improve descriptions
bicpi a636945
Fixes after review
bicpi cecc762
Update "method" description
bicpi 70ca6da
Improvements after review
bicpi 4555495
Update note wording for "method" option
bicpi 793c8a0
Add note about the PATCH method
bicpi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a
to
missing at the end of the sentence ([...] where to send [...] to.).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh, maybe both is possible? Is some native speaker around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not native, but I also agree with @bicpi: imo both are possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, I think without the
to
sounds a little better. So, keep it as is