4 * Default theme implementation for a fieldset element and its children.
7 * - attributes: HTML attributes for the <fieldset> element.
8 * - errors: (optional) Any errors for this <fieldset> element, may not be set.
9 * - required: Boolean indicating whether the <fieldeset> element is required.
10 * - legend: The <legend> element containing the following properties:
11 * - title: Title of the <fieldset>, intended for use as the text
13 * - attributes: HTML attributes to apply to the <legend> element.
14 * - description: The description element containing the following properties:
15 * - content: The description content of the <fieldset>.
16 * - attributes: HTML attributes to apply to the description container.
17 * - children: The rendered child elements of the <fieldset>.
18 * - prefix: The content to add before the <fieldset> children.
19 * - suffix: The content to add after the <fieldset> children.
21 * @see template_preprocess_fieldset()
34 <fieldset{{ attributes.addClass(classes) }}>
36 set legend_span_classes = [
38 required ? 'js-form-required',
39 required ? 'form-required',
42 {# Always wrap fieldset legends in a <span> for CSS positioning. #}
43 <legend{{ legend.attributes }}>
44 <span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
46 <div class="fieldset-wrapper">
53 <span class="field-prefix">{{ prefix }}</span>
57 <span class="field-suffix">{{ suffix }}</span>
59 {% if description.content %}
60 <div{{ description.attributes.addClass('description') }}>{{ description.content }}</div>