When I update an instance that has multiple formset FKs, I'm unable to add formsets after removing them since the remove link will only work while MAX_FORMS < TOTAL_FORMS > INITIAL_FORMS.
For instance, with this initial data:
TOTAL_FORMS = 4
INITIAL_FORMS = 3
MAX_FORMS = 4
If i remove 3 formsets, TOTAL_FORMS only gets decremented by only 1 since INITIAL_FORMS is 3 and I can only add 1 form since MAX_FORMS = 4. So the net result is a formset with a max of 4 with only 1 being able to be editied.
I hope I described the issue well enough. I think TOTAL_FORMS and INITIAL_FORMS need to be decremented simultaneously to allow for the re-addition of formsets after their removal. I'm not a JS guy though. I love this otherwise and really need it to work!
When I update an instance that has multiple formset FKs, I'm unable to add formsets after removing them since the remove link will only work while MAX_FORMS < TOTAL_FORMS > INITIAL_FORMS.
For instance, with this initial data: TOTAL_FORMS = 4 INITIAL_FORMS = 3 MAX_FORMS = 4
If i remove 3 formsets, TOTAL_FORMS only gets decremented by only 1 since INITIAL_FORMS is 3 and I can only add 1 form since MAX_FORMS = 4. So the net result is a formset with a max of 4 with only 1 being able to be editied.
I hope I described the issue well enough. I think TOTAL_FORMS and INITIAL_FORMS need to be decremented simultaneously to allow for the re-addition of formsets after their removal. I'm not a JS guy though. I love this otherwise and really need it to work!
Thanks