formset.empty_form
is great for generating a blank form that I can use in my JS. However, once the form has been posted, empty_form
suddenly contains error messages and it magically forgets all its initial values. Why is that?
Instead, I have to do this stupid hack to get an actually empty form
empty_form = MyFormSet().empty_form
Regardless if there is post data. I can't even just overwrite it with
myformset.empty_form = MyFormSet().empty_form
Because it throws this stupid error message
can't set attribute