Skip to content

Commit 5ecc632

Browse files
committed
Event form modifications improvements
1 parent d005fcd commit 5ecc632

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

form/dynamic_form_modification.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ callbacks only because in two different scenarios, the data that you can use is
591591
available in different events. Other than that, the listeners always perform
592592
exactly the same things on a given form.
593593

594+
.. tip::
595+
596+
The ``FormEvents::POST_SUBMIT`` event does not allow to modify the form
597+
the listener is bound to, but it allows to modify its parent.
598+
594599
One piece that is still missing is the client-side updating of your form after
595600
the sport is selected. This should be handled by making an AJAX call back to
596601
your application. Assume that you have a sport meetup creation controller::

form/events.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ View data Same as in ``FormEvents::POST_SET_DATA``
185185
See all form events at a glance in the
186186
:ref:`Form Events Information Table <component-form-event-table>`.
187187

188-
.. caution::
189-
190-
At this point, you cannot add or remove fields to the form.
191-
192188
.. sidebar:: ``FormEvents::SUBMIT`` in the Form component
193189

194190
The ``Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener``
@@ -219,7 +215,8 @@ View data Normalized data transformed using a view transformer
219215

220216
.. caution::
221217

222-
At this point, you cannot add or remove fields to the form.
218+
At this point, you cannot add or remove fields to the current form and its
219+
children.
223220

224221
.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component
225222

0 commit comments

Comments
 (0)