Skip to content

Commit

Permalink
#6232 update forms as services section
Browse files Browse the repository at this point in the history
  • Loading branch information
backbone87 authored and xabbuh committed Feb 7, 2016
1 parent b56880b commit be54971
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions best_practices/forms.rst
Expand Up @@ -71,13 +71,9 @@ Registering Forms as Services

You can also
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
But this is *not* recommended unless you plan to reuse the new form type in many
places or embed it in other forms directly or via the
:doc:`CollectionType </reference/forms/types/collection>`.

For most forms that are used only to edit or create something, registering
the form as a service is over-kill, and makes it more difficult to figure
out exactly which form class is being used in a controller.
This is only needed if your form type requires some dependencies to be injected
by the container, otherwise it is unnecessary overhead and therefore *not*
recommended to do this for all form type classes.

Form Button Configuration
-------------------------
Expand Down

0 comments on commit be54971

Please sign in to comment.