Skip to content

Commit 92c39c6

Browse files
committed
minor #5996 Clarify example for SUBMIT form event (bkosborne)
This PR was merged into the 2.3 branch. Discussion ---------- Clarify example for SUBMIT form event | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | #5990 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. Commits ------- 4794492 Clarify example for SUBMIT form event
2 parents f0e8e88 + 4794492 commit 92c39c6

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
@@ -191,10 +191,9 @@ View data Same as in ``FormEvents::POST_SET_DATA``
191191

192192
.. sidebar:: ``FormEvents::SUBMIT`` in the Form component
193193

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

199198
C) The ``FormEvents::POST_SUBMIT`` Event
200199
........................................

0 commit comments

Comments
 (0)