6.1.2 forms.base.fieldset Fieldsets
The <fieldset>
element groups a set of form fields, optionally under a
common name given by the <legend>
element.
Example
Markup: base/forms/forms-fieldset.twig
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">fieldset</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">legend</span>></span>A fieldset<span class="hljs-tag"></<span class="hljs-name">legend</span>></span>
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"fieldsetText"</span>></span>Text input<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"fieldsetText"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Text input"</span>></span>
<span class="hljs-tag"></<span class="hljs-name">fieldset</span>></span>
<span class="hljs-tag"><<span class="hljs-name">fieldset</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> <span class="hljs-attr">disabled</span>></span>
<span class="hljs-tag"><<span class="hljs-name">legend</span>></span>A disabled fieldset<span class="hljs-tag"></<span class="hljs-name">legend</span>></span>
<span class="hljs-tag"><<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"fieldsetText2"</span>></span>Disabled text input<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"fieldsetText2"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Disabled input"</span>></span>
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"fieldsetSelect"</span>></span>Disabled select menu<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
<span class="hljs-tag"><<span class="hljs-name">select</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"fieldsetSelect"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>Disabled select<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
<span class="hljs-tag"></<span class="hljs-name">select</span>></span>
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">label</span>></span><span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"checkbox"</span>></span> Can't check this<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
<span class="hljs-tag"></<span class="hljs-name">fieldset</span>></span>
</span>
Source:
base/forms/_forms.scss
, line 196