mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.10.x] Doc'd the need to provide initial for formset submissions.
Backport of 80f5a4d87a6068efe7c04bd9436f0293fbbb4db3 from master
This commit is contained in:
parent
1c47c7e6f1
commit
87595c92f3
@ -80,6 +80,11 @@ There are now a total of three forms showing above. One for the initial data
|
|||||||
that was passed in and two extra forms. Also note that we are passing in a
|
that was passed in and two extra forms. Also note that we are passing in a
|
||||||
list of dictionaries as the initial data.
|
list of dictionaries as the initial data.
|
||||||
|
|
||||||
|
If you use an ``initial`` for displaying a formset, you should pass the same
|
||||||
|
``initial`` when processing that formset's submission so that the formset can
|
||||||
|
detect which forms were changed by the user. For example, you might have
|
||||||
|
something like: ``ArticleFormSet(request.POST, initial=[...])``.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
:ref:`Creating formsets from models with model formsets <model-formsets>`.
|
:ref:`Creating formsets from models with model formsets <model-formsets>`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user