Skip to content

[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
merged 7 commits into from
Mar 4, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve descriptions
  • Loading branch information
bicpi committed Jan 23, 2014
commit 83ff4b1843f3f82369f494ffa3d17278a98b29fd
3 changes: 2 additions & 1 deletion reference/forms/types/options/action.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ action
**type**: ``string`` **default**: empty string

This option specifies where to send the form's data on submission (usually an
Copy link
Member

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.).

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Member

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

URI). An empty value is considered a same-document references, i.e. the form
URI). It's value is rendered as the ``action`` attribute of the ``form``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its

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.
8 changes: 6 additions & 2 deletions reference/forms/types/options/method.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ method

**type**: ``string`` **default**: ``POST``

This option specifies the HTTP method used to submit the form's data. Possible
values are:
This option specifies the HTTP method used to submit the form's data. It's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its

value is rendered as the ``method`` attribute of the ``form`` element.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also impact the handling of requests in handleRequest

Possible values are:

* POST
* GET
* PUT
* DELETE
* PATCH

As PUT, DELETE and PATCH are not nativly supported by most clients, Symfony
simulates them, see :doc:`/cookbook/routing/method_parameters`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for more information see ... || to read more see ...


.. note::
Using ``PUT``, ``PATCH`` and ``DELETE`` is only allowed if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing empty line

:ref:`configuration-framework-http_method_override` is enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording is wrong. It is allowed to use them without using the http method override, if your client can override the method through the header or use the method natively (for instance when you are building an API rather than dealing with browsers as clients)