Fieldset
Supported products
- Central CMS
- Central Forms
- Central Connect
Fieldsets group related controls into logical sections.
Basic usage
{{
form.fieldset_start()
}}
{# form fields #}
{{
form.fieldset_end()
}}
Helper options
You can configure this helper using the common helper options, the following options are specific to this helper.
Option | Type | Description |
---|---|---|
legend | string | Label for the optional <legend> element |
Legend
Give fieldsets a descriptive legend to break your form into logical sections.
- Twig
- HTML
{{
form.fieldset_start({
'legend': 'I am legend'
})
}}
{{
form.text({
'label': 'Example field',
'id': 'field-1',
'name': 'field-1'
})
}}
{{
form.fieldset_end()
}}
<fieldset>
<legend class="legend">I am legend</legend>
<div class="form__group">
<label for="field-1" class="control__label">Example field</label>
<div class="controls">
<input id="field-1" name="field-1" type="text" class="form__control" />
</div>
</div>
</fieldset>