Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be54971

Browse filesBrowse files
backbone87xabbuh
authored andcommitted
#6232 update forms as services section
1 parent b56880b commit be54971
Copy full SHA for be54971

File tree

Expand file treeCollapse file tree

1 file changed

+3
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-7
lines changed

‎best_practices/forms.rst

Copy file name to clipboardExpand all lines: best_practices/forms.rst
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,9 @@ Registering Forms as Services
7171

7272
You can also
7373
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
74-
But this is *not* recommended unless you plan to reuse the new form type in many
75-
places or embed it in other forms directly or via the
76-
:doc:`CollectionType </reference/forms/types/collection>`.
77-
78-
For most forms that are used only to edit or create something, registering
79-
the form as a service is over-kill, and makes it more difficult to figure
80-
out exactly which form class is being used in a controller.
74+
This is only needed if your form type requires some dependencies to be injected
75+
by the container, otherwise it is unnecessary overhead and therefore *not*
76+
recommended to do this for all form type classes.
8177

8278
Form Button Configuration
8379
-------------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.