fieldset
Fieldsets should be used to wrap multiple different form elements which belong together in terms of content. E.g. form elements describing a delivery address should be wrapped in one fieldset and form elements describing an invoice address should be wrapped in another fieldset.
Information
- Folder
src/components/fsk/form/fieldset
Files
Schema
Mocks
Template
// src/components/fsk/form/fieldset/fieldset.html.twig
<fieldset{{ attributes ? attributes|without("class") : "" }} class="FskFieldset {{ attributes.class }}">
<legend{{ legend.attributes ? legend.attributes|without("class") : "" }} class="FskFieldset-legend">
<span{{ legend_span.attributes ? legend_span.attributes|without("class") : "" }} class="FskFieldset-label">{{ legend.title }}</span>
</legend>
<div class="FskFieldset-wrapper">
{% if prefix %}
<span class="FskFieldset-prefix">{{ prefix }}</span>
{% endif %}
{{ children }}
{% if suffix %}
<span class="FskFieldset-suffix">{{ suffix }}</span>
{% endif %}
<div class="FskFieldset-errorMessage" role="alert">{% if errors %}{{ errors }}{% endif %}</div>
{% if description.content %}
<div{{ description.attributes ? description.attributes|without("class") : "" }} class="FskFieldset-description">{{ description.content }}</div>
{% endif %}
</div>
</fieldset>