Skip to content

Commit 4a1d425

Browse files
committed
Fixed #8649 - Documented a caveat about dynamically adjusting formsets.
1 parent ac4d82b commit 4a1d425

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/topics/forms/formsets.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ this management data, an exception will be raised::
193193

194194
It is used to keep track of how many form instances are being displayed. If
195195
you are adding new forms via JavaScript, you should increment the count fields
196-
in this form as well.
196+
in this form as well. On the other hand, if you are using JavaScript to allow
197+
deletion of existing objects, then you need to ensure the ones being removed
198+
are properly marked for deletion by including ``form-#-DELETE`` in the ``POST``
199+
data. It is expected that all forms are present in the ``POST`` data regardless.
197200

198201
The management form is available as an attribute of the formset
199202
itself. When rendering a formset in a template, you can include all

0 commit comments

Comments
 (0)