{% for field in row %}
{% set columnClass = "field freeform-column " ~ form.customAttributes.columnClass %}
{% if field.type == "submit" %}
{% set columnClass = columnClass ~ " freeform-column-content-align-" ~ field.position %}
{% endif %}
{% set class = "freeform-input" %}
{% if field.type in ["checkbox", "checkbox_group", "radio_group", "mailing_list", "dynamic_recipients"] %}
{% set class = class %}
{% elseif field.type == "submit" %}
{% set class = class ~ " " %}
{% else %}
{% set class = class ~ " text" %}
{% endif %}
{% set labelClass = "freeform-label" ~ (field.inputOnly ? " freeform-input-only-label" : "") ~ (field.required ? " freeform-required" : "") %}
{% set instructionsClass = "freeform-instructions" %}
{% set errorClass = "freeform-errors" %}
{% if field.type == "select" or (field.type == "dynamic_recipients" and field.showAsSelect) %}
{{ field.renderLabel({ labelClass: labelClass }) }}
{{ field.renderInstructions({ instructionsClass: instructionsClass }) }}
{{ field.renderInput({ class: class }) }}
{{ field.renderErrors({ errorClass: errorClass }) }}
{% elseif field.type == "submit" %}
{{ field.renderInput({ class: "btn submit" }) }}
{% else %}
{{ field.render({
class: class,
labelClass: labelClass,
errorClass: errorClass,
instructionsClass: instructionsClass,
}) }}
{% endif %}
{# FOR FREEFORM PAYMENTS #}
{% if field.layoutRows is defined %}
{% for layoutRow in field.layoutRows %}
{% endfor %}
{% endif %}