Skip to content

Commit bf85755

Browse files
Expanding recommendation for finishView()...
... to include the widgets created by ChoiceType as well. Might conflict with a minor change I just did in #17066
1 parent c710e1e commit bf85755

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

form/create_custom_field_type.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ These are the most important methods that a form type class can define:
146146
extensions, but you can create any custom option you need.
147147

148148
``finishView()``
149-
When creating a form type that consists of many fields, this method allows
150-
to modify the "view" of any of those fields. For any other use case, it's
151-
recommended to use instead the ``buildView()`` method.
149+
This method allows to modify the "view" of any rendered widget. This is useful
150+
if your form type consists of many fields, or contains a type that produces
151+
many HTML elements (e.g. ``ChoiceType``). For any other use case, it's
152+
recommended to use ``buildView()`` instead.
152153

153154
``getParent()``
154155
If your custom type is based on another type (i.e. they share some

0 commit comments

Comments
 (0)