-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simlutaneous deletion and creation not working #180
Comments
I am seeing this as well with django 3.1 |
Thank god. I could not delete any formset form but the first one because of this line. Reviewing #173, it seems like the author did not implement the library properly into his project, as decrementing beyond the specified amount of |
I had the same problem, I spent hours looking for the problem and as you mention everything works fine for me if the line 95 src/jquery.formset.js |
I solved this problem without deleting the code. I assigned unique CSS class name to formCssClass for each formset as in Django Dynamic Formsets documentation: |
Just here to add that indeed deleting |
Thanks for this @pavlutom I was having the same problem. Removing this line: totalForms.val(forms.length); solved the issue. |
For god Sake, guys. Thanks Million for that solution. Thanks Million Again. |
@karlos-perez, your solution probably has been working. but maybe you didn't understand what was the main issue. Not sure of course. |
If I delete one item and create another in one POST, the new item is not created, only the deletion happens. It works fine if I remove line 95 in src/jquery.formset.js (
totalForms.val(forms.length);
). This code was introduced in #173. I'm not sure what was the purpose of this line, probably to fix some other error that I didn't notice.I am using Django 3.0.7
The text was updated successfully, but these errors were encountered: