Using for loop to Html Form in Django Template

I am facing problems handling forms in Django template for loop.

<form method="post" id="infoloop{{forloop.counter}}">
{% csrf_token %}
<div class="form-group">

<button type="submit" name="infobutton" class="btn btn-warning float-right {% if subs%} {% else %}disabled{% endif %}">update</button>
</div>

                                                    
</form>

I want to create this form my all employees, but seems doesn't work. Only first loop can create form tag so i can't update second employee info's. Can anyone help me?

Back to Top