Open agascar opened 1 year ago
Could this cause an Incorrect use of <label for=FORM_ELEMENT>
error?
sort_order = RadioField(u'Sort Order', choices=sort_order_values,
default='descend', validators=[DataRequired()])
<form-item class="radio-group">
{{ form.sort_order.label(class="radio-label", id=False) }}
{% for btn in form.sort_order -%}
{{ btn(class="radio-btn") }}
{{ btn.label(class="radio-value") }}
{%- endfor %}
</form-item>
Actual Behavior
When using a RadioField, the "for" attribute of the associate label, points to the id of a list, whitch is incorrect since list are not form controls, this cause problems with html validators like https://validator.w3.org/
Expected Behavior
Environment