{% extends 'formie/_formfields/field' %}

{% block field %}

    {% if field.settings.useMultipleFields %}
        {% namespace field.handle %}
            {% for row in field.getRows(false) %}
                <div class="fui-row">
                    {% for field in row.getFields(false) %}
                        <div class="fui-col-auto">
                            {% set value = element.getFieldValue(field.fieldKey) ?? field.normalizeValue(field.getDefaultValue(), null) %}
                            {% set errors = element.getErrors(field.fieldKey) ?? [] %}

                            {{ field.getCpInputHtml(value, element) }}
                        </div>
                    {% endfor %}
                </div>
            {% endfor %}
        {% endnamespace %}
    {% else %}
        {% include '_includes/forms/text' %}
    {% endif %}

{% endblock %}
