I have this form in my template:
<form method="POST" class="form" action="/groups/">
{% csrf_token %}
{% block hidden_debtors %}
{% for name, email in debtor_info.items %}
<input type="hidden" name="hidden-debtor" value="{{email}}">
{% endfor %}
{% endblock %}
<input type="text" name="new-debtor" id="round-input" placeholder="Select Debtor(s)"></input>
<button type="submit" name="add-debtor" class="btn btn-primary">Add Debtor</button>
</form>
As you can see the hidden type inputs all share the name “hidden-debtor” however they each have distinct email values. I was wondering how I would be able to access each one of these distinct values in my views.py through a loop or something
Thanks!
You can get a list of values in your view like this:
Documentation