django-crispy-forms / crispy-tailwind

A Tailwind template pack for django-crispy-forms
MIT License
331 stars 56 forks source link

form select fields lose their values if form is returned with an error. #83

Closed io2 closed 3 years ago

io2 commented 3 years ago

When using any of the formset_factorys to generate multiple forms, the select fields lose their values if the form is returned with an error.

This happens because the template renders field.name instead of field.html_name.

field.name is the same for all forms, field.html_name is unique for each form instance