From 405d6208e55a3db4d82f2f9b1898b8e481688e96 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sun, 31 Mar 2013 04:34:28 -0400 Subject: [PATCH] [1.5.x] Fixed #8649 - Documented a caveat about dynamically adjusting formsets. Backport of 4a1d425cfe from master --- docs/topics/forms/formsets.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index e315220a77..8aef8758ee 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -180,7 +180,10 @@ this management data, an exception will be raised:: It is used to keep track of how many form instances are being displayed. If you are adding new forms via JavaScript, you should increment the count fields -in this form as well. +in this form as well. On the other hand, if you are using JavaScript to allow +deletion of existing objects, then you need to ensure the ones being removed +are properly marked for deletion by including ``form-#-DELETE`` in the ``POST`` +data. It is expected that all forms are present in the ``POST`` data regardless. The management form is available as an attribute of the formset itself. When rendering a formset in a template, you can include all