{# /** * @file * Default theme implementation for a webform section element and its children. * * Available variables: * - attributes: HTML attributes for the
element. * - errors: (optional) Any errors for this
element, may not be set. * - required: Boolean indicating whether the
element is required. * - title: The title/header of the section header. * - title_attributes: HTML attributes to apply to the title/header element. * - title_tag: The title/header HTML tag. * - description: The description element containing the following properties: * - content: The description content of the
. * - attributes: HTML attributes to apply to the description container. * - description_display: Description display setting. It can have these values: * - before: The description is output before the element. * - after: The description is output after the element. This is the default * value. * - invisible: The description is output after the element, hidden visually * but available to screen readers. * - children: The rendered child elements of the
. * - prefix: The content to add before the .section-wrapper children. * - suffix: The content to add after the .section-wrapper children. * * Copied from: fieldset.html.twig * * @see template_preprocess_webform_section() * * @ingroup themeable */ #} {% set classes = [ 'js-form-item', 'form-item', 'js-form-wrapper', 'form-wrapper', 'webform-section', ] %} {% set title_classes = [ 'webform-section-title', required ? 'js-form-required', required ? 'form-required', ] %} {% if title %} <{{ title_tag }}{{ title_attributes.addClass(title_classes) }}>{{ title }} {% endif %}
{% if errors %}
{{ errors }}
{% endif %} {% if description_display in ['before', 'invisible'] and description.content %} {{ description.content }}
{% endif %} {% if prefix %} {{ prefix }} {% endif %} {{ children }} {% if suffix %} {{ suffix }} {% endif %} {% if description_display == 'after' and description.content %} {{ description.content }} {% endif %}