Skip to content

Commit 4794492

Browse files
committed
Clarify example for SUBMIT form event
It's indicated in the docs that form field cannot be added/removed by listeners of the SUBMIT form event, but the example provided was removing fields. While it's possible to do so, it's not recommended since it has little effect. Replaced with a different example implementation.
1 parent 7dcce1b commit 4794492

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/form/form_events.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,9 @@ View data Same as in ``FormEvents::POST_SET_DATA``
178178

179179
.. sidebar:: ``FormEvents::SUBMIT`` in the Form component
180180

181-
The ``Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener``
182-
subscribes to the ``FormEvents::SUBMIT`` event in order to remove the
183-
fields that need to be removed whenever manipulating a collection of forms
184-
for which ``allow_delete`` has been enabled.
181+
The ``Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener``
182+
subscribes to the ``FormEvents::SUBMIT`` event in order to prepend a default
183+
protocol to URL field data that was submitted without a protocol.
185184

186185
C) The ``FormEvents::POST_SUBMIT`` Event
187186
........................................

0 commit comments

Comments
 (0)