diff --git a/core/modules/inline_form_errors/src/FormErrorHandler.php b/core/modules/inline_form_errors/src/FormErrorHandler.php
index 2bcbfc60be..394440d2d1 100644
--- a/core/modules/inline_form_errors/src/FormErrorHandler.php
+++ b/core/modules/inline_form_errors/src/FormErrorHandler.php
@@ -88,6 +88,10 @@ protected function displayErrorMessages(array $form, FormStateInterface $form_st
       if (!empty($form_element['#error_no_message'])) {
         unset($errors[$name]);
       }
+      // Do not show links/summary for the whole form if disabled.
+      elseif (!empty($form['#disable_inline_form_errors_summary'])) {
+        unset($errors[$name]);
+      }
       elseif ($is_visible_element && $has_title && $has_id) {
         $error_links[] = $this->l($title, Url::fromRoute('<none>', [], ['fragment' => $form_element['#id'], 'external' => TRUE]));
         unset($errors[$name]);
diff --git a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
index f110b36af9..a5b38e40a7 100644
--- a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
+++ b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
@@ -169,4 +169,34 @@ public function testDisplayErrorMessagesNotInline() {
     $form_error_handler->handleFormErrors($form, $form_state);
   }
 
+  /**
+   * Tests that disabling Inline Form Errors summary works.
+   */
+  public function testDisplayErrorMessagesNoSummary() {
+    $form_error_handler = $this->getMockBuilder(FormErrorHandler::class)
+      ->setConstructorArgs([$this->getStringTranslationStub(), $this->getMock(LinkGeneratorInterface::class), $this->getMock(RendererInterface::class)])
+      ->setMethods(['drupalSetMessage'])
+      ->getMock();
+
+    $form = [
+      '#parents' => [],
+      '#disable_inline_form_errors_summary' => TRUE,
+      '#array_parents' => [],
+    ];
+
+    $form['test'] = [
+      '#type' => 'textfield',
+      '#title' => 'Test',
+      '#parents' => ['test'],
+      '#id' => 'edit-test',
+      '#array_parents' => ['test'],
+    ];
+
+    $form_state = new FormState();
+    $form_state->setErrorByName('test', 'invalid');
+    $form_error_handler->handleFormErrors($form, $form_state);
+
+    $form_error_handler->expects($this->never())->method('drupalSetMessage');
+  }
+
 }
