Skip to content

[Form] Minor fix #15956

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
Oct 20, 2021
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
4 changes: 2 additions & 2 deletions form/multiple_buttons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ How to Submit a Form with Multiple Buttons

When your form contains more than one submit button, you will want to check
which of the buttons was clicked to adapt the program flow in your controller.
To do this, add a second button with the caption "Save and add" to your form::
To do this, add a second button with the caption "Save and Add" to your form::

$form = $this->createFormBuilder($task)
->add('task', TextType::class)
Expand All @@ -17,7 +17,7 @@ To do this, add a second button with the caption "Save and add" to your form::

In your controller, use the button's
:method:`Symfony\\Component\\Form\\ClickableInterface::isClicked` method for
querying if the "Save and add" button was clicked::
querying if the "Save and Add" button was clicked::

if ($form->isSubmitted() && $form->isValid()) {
// ... perform some action, such as saving the task to the database
Expand Down