<div class="form-field radio-field">
    {% if field.label %}
    <fieldset class="radio-fieldset{% if field.error %} field-error{% endif %}">
        <legend class="field-label">
            {{ field.label }}
        </legend>

        {% for choice in choices %}
        <label class="radio-option">
            <input
                type="radio"
                name="{{ field.name }}"
                id="id_{{ field.name }}_{{ loop.index0 }}"
                value="{{ choice.value }}"
                {% if choice.selected or choice.value == field.value %}checked{% endif %}
                {% if field.is_required.choice %}required{% endif %}
                {% for key, value in field.html_attributes %}{{ key }}="{{ value }}" {% endfor %}
                {% if readonly.choice %}readonly{% endif %}
                {% if disabled.choice %}disabled{% endif %}
            >
            <span class="radio-label">{{ choice.label }}</span>
        </label>
        {% endfor %}

    </fieldset>
    {% endif %}

    {% if field.error %}
    <span class="field-error-message">{{ field.error }}</span>
    {% endif %}
</div>