4👍
✅
First, you would need a custom template filter to mimic getattr()
functionality, see:
Then, you would need add
template filter for string concatenation:
{% load getattribute %}
{% for i in 1234|make_list %}
{% with "answer_"|add:i as answer %}
{{ form|getattribute:answer }}
{% endwith %}
{% endfor %}
Source:stackexchange.com