{% set elementTechnicalName = element.technicalName %}
{% if parentElementTechnicalName %}
{% set elementTechnicalName = "#{parentElementTechnicalName}[#{elementTechnicalName}]" %}
{% endif %}
{% set elementId = "fb-#{element.id}" %}
{% if parentElementId %}
{% set elementId = "#{parentElementId}#{elementId}" %}
{% endif %}
{% set elementValue = element.value %}
{% if not elementValue and element.defaultValue %}
{% if element.defaultValue|first == "{" %}
{% set elementValue %}{% include(template_from_string(element.defaultValue)) %}{% endset %}
{% else %}
{% set elementValue = element.defaultValue %}
{% endif %}
{% endif %}
{% set wrappedContent %}
{% block input_label %}
{% sw_include "@MoorlForms/plugin/moorl-fb/component/wrapper/field-label.html.twig" ignore missing %}
{% endblock %}
{% set formElementInput %}
{% block input_el %}
<input
type="{% block input_type %}text{% endblock %}"
name="{{ elementTechnicalName }}"
id="{{ elementId }}"
class="{% block input_class %}form-control{% endblock %}"
value="{{ elementValue }}"
placeholder="{{ element.translated.placeholder }}"
{% if element.pattern %}pattern="{{ element.pattern }}"{% endif %}
{% if element.maxlength %}maxlength="{{ element.maxlength }}"{% endif %}
{% if element.required %}required{% endif %}
{% if element.disabled %}readonly{% endif %}
{% block input_attributes %}{% endblock %}
>
{% endblock %}
{% endset %}
{% sw_include "@MoorlForms/plugin/moorl-fb/component/wrapper/input-group.html.twig" ignore missing %}
{% block input_subline %}
{% if element.maxlength %}
<small class="text-muted">{{ "moorl-fb.maxlength"|trans({maxlength:element.maxlength}) }}</small>
{% endif %}
{% endblock %}
{% endset %}
{% sw_include "@MoorlForms/plugin/moorl-fb/component/wrapper/wrapper-no-style.html.twig" with {
sectionClasses: ['form-group']
} %}