form--group.html.twig in Open Social 8.8
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/form/form--group.html.twig
- 8 themes/socialbase/templates/form/form--group.html.twig
- 8.2 themes/socialbase/templates/form/form--group.html.twig
- 8.3 themes/socialbase/templates/form/form--group.html.twig
- 8.4 themes/socialbase/templates/form/form--group.html.twig
- 8.5 themes/socialbase/templates/form/form--group.html.twig
- 8.6 themes/socialbase/templates/form/form--group.html.twig
- 8.7 themes/socialbase/templates/form/form--group.html.twig
Theme override for a fieldset element and its children.
Available variables:
- attributes: HTML attributes for the fieldset element.
- errors: (optional) Any errors for this fieldset element, may not be set.
- required: Boolean indicating whether the fieldeset element is required.
- legend: The legend element containing the following properties:
- title: Title of the fieldset, intended for use as the text of the legend.
- attributes: HTML attributes to apply to the legend.
- description: The description element containing the following properties:
- content: The description content of the fieldset.
- attributes: HTML attributes to apply to the description container.
- children: The rendered child elements of the fieldset.
- prefix: The content to add before the fieldset children.
- suffix: The content to add after the fieldset children.
See also
File
themes/socialbase/templates/form/form--group.html.twigView source
- {#
- /**
- * @file
- * Theme override for a fieldset element and its children.
- *
- * Available variables:
- * - attributes: HTML attributes for the fieldset element.
- * - errors: (optional) Any errors for this fieldset element, may not be set.
- * - required: Boolean indicating whether the fieldeset element is required.
- * - legend: The legend element containing the following properties:
- * - title: Title of the fieldset, intended for use as the text of the legend.
- * - attributes: HTML attributes to apply to the legend.
- * - description: The description element containing the following properties:
- * - content: The description content of the fieldset.
- * - attributes: HTML attributes to apply to the description container.
- * - children: The rendered child elements of the fieldset.
- * - prefix: The content to add before the fieldset children.
- * - suffix: The content to add after the fieldset children.
- *
- * @see template_preprocess_fieldset()
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- 'form-group',
- ]
- %}
- <fieldset{{ attributes.addClass(classes) }}>
- {%
- set label_classes = [
- 'control-label',
- required ? 'js-form-required',
- required ? 'form-required',
- ]
- %}
- {# Always wrap fieldset legends in a SPAN for CSS positioning. #}
- <label{{ legend.attributes.addClass(label_classes) }}>
- <span{{ legend_span.attributes }}>{{ legend.title }}</span>
- </label>
- <div class="fieldset-wrapper">
- {% if errors %}
- <div>
- {{ errors }}
- </div>
- {% endif %}
- {% if prefix %}
- <span class="field-prefix">{{ prefix }}</span>
- {% endif %}
- {{ children }}
- {% if suffix %}
- <span class="field-suffix">{{ suffix }}</span>
- {% endif %}
- {% if description.content %}
- <div{{ description.attributes.addClass('help-block') }}>{{ description.content }}</div>
- {% endif %}
- </div>
- </fieldset>
-