inline-form-errors-summary.html.twig
Default theme implementation for the Inline Form Errors summary.
Available variables:
- error_links: A list of render arrays for the errored elements, one link per element.
- form_id: The form's machine ID; drives the theme suggestion inline_form_errors_summary__FORM_ID.
1 theme call to inline-form-errors-summary.html.twig
- FormErrorHandler::displayErrorMessages in core/
modules/ inline_form_errors/ src/ FormErrorHandler.php - Loops through and displays all form errors.
File
-
core/
modules/ inline_form_errors/ templates/ inline-form-errors-summary.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation for the Inline Form Errors summary.
- *
- * Available variables:
- * - error_links: A list of render arrays for the errored elements, one link
- * per element.
- * - form_id: The form's machine ID; drives the theme suggestion
- * inline_form_errors_summary__FORM_ID.
- *
- * @ingroup themeable
- */
- #}
- {% if error_links %}
- {%- set count = error_links|length -%}
- {%- trans -%}
- <span>{{ count }} error has been found:</span>
- {%- plural count -%}
- <span>{{ count }} errors have been found:</span>
- {%- endtrans -%}
- {{ include('item-list.html.twig', {
- items: error_links,
- list_type: 'ul',
- wrapper_attributes: create_attribute(),
- context: {list_style: 'comma-list'},
- }) }}
- {% endif %}
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.