Skip to content

[Form] Fix typos in the Dynamic Form Modification document #17240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Using an event listener, your form might look like this::
}

The problem is now to get the current user and create a choice field that
contains only this user's friends. This can be done injecting the ``Security``
contains only this user's friends. This can be done by injecting the ``Security``
service into the form type so you can get the current user object::

use Symfony\Component\Security\Core\Security;
Expand Down Expand Up @@ -490,7 +490,7 @@ The type would now look like::
$sport = $event->getForm()->getData();

// since we've added the listener to the child, we'll have to pass on
// the parent to the callback functions!
// the parent to the callback function!
$formModifier($event->getForm()->getParent(), $sport);
}
);
Expand All @@ -510,7 +510,7 @@ exactly the same things on a given form.
the listener is bound to, but it allows modifications to its parent.

One piece that is still missing is the client-side updating of your form after
the sport is selected. This should be handled by making an AJAX call back to
the sport is selected. This should be handled by making an AJAX callback to
your application. Assume that you have a sport meetup creation controller::

// src/Controller/MeetupController.php
Expand Down