{% set form_children %}
{% set fieldset_children %}
{% set label %}
{% include '@bolt-components-form/form-label.twig' with {
title: 'Floating Label',
displayType: 'floating',
attributes: {
for: 'floating-label',
},
} only %}
{% endset %}
{% set input %}
{% include '@bolt-components-form/form-input.twig' with {
attributes: {
placeholder: 'Enter value (floating label)',
type: 'text',
id: 'floating-label',
},
} only %}
{% endset %}
{% include '@bolt-components-form/form-element.twig' with {
label: label,
children: input,
} only %}
{% set label %}
{% include '@bolt-components-form/form-label.twig' with {
title: '<strong>Block Label</strong>',
displayType: 'block',
attributes: {
for: 'block-label',
},
} only %}
{% endset %}
{% set input %}
{% include '@bolt-components-form/form-input.twig' with {
attributes: {
placeholder: 'Enter value (block label)',
type: 'text',
id: 'block-label',
},
} only %}
{% endset %}
{% include '@bolt-components-form/form-element.twig' with {
label: label,
children: input,
labelDisplay: 'before',
} only %}
{% endset %}
{% include '@bolt-components-form/form-fieldset.twig' with {
legendTitle: 'Fieldset Legend',
legendInnerAttributes: {
class: 'u-bolt-visuallyhidden',
},
children: fieldset_children,
} only %}
{% endset %}
{% include '@bolt-components-form/form.twig' with {
children: form_children
} only %}