Quick shortcut for including hidden fields in your forms:
forms.py
class SomeForm(forms.Form): | |
hidden = forms.CharField(required=False, max_length=50, widget=forms.HiddenInput()) |
template.html
{% for hidden in form.hidden_fields %} | |
{{ hidden }} | |
{% endfor %} |
Now you don’t have to worry about each and every hidden field.
Nice catch!