Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9e375c

Browse filesBrowse files
committed
Added caution block under delete_empty to warn the developer when he try to activate delete_empty
for collections of compound forms.
1 parent f3eaa80 commit b9e375c
Copy full SHA for b9e375c

File tree

Expand file treeCollapse file tree

2 files changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-0
lines changed

‎reference/forms/types/collection.rst

Copy file name to clipboardExpand all lines: reference/forms/types/collection.rst
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ delete_empty
268268

269269
**type**: ``Boolean`` **default**: ``false``
270270

271+
.. caution::
272+
273+
Delete empty will only remove items when the normalized value is null.
274+
If your `type`_ is a compound form type, you need to have the :ref:`required <reference-form-option-required>`
275+
option set to ``false`` inside `options`_, See :ref:`empty_data <reference-form-option-empty-data>`.
276+
277+
271278
If you want to explicitly remove entirely empty collection entries from your
272279
form you have to set this option to true. However, existing collection entries
273280
will only be deleted if you have the allow_delete_ option enabled. Otherwise

‎reference/forms/types/form.rst

Copy file name to clipboardExpand all lines: reference/forms/types/form.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ option on the form.
8080

8181
.. include:: /reference/forms/types/options/data_class.rst.inc
8282

83+
.. _reference-form-option-empty-data:
84+
8385
.. include:: /reference/forms/types/options/empty_data.rst.inc
8486
:end-before: DEFAULT_PLACEHOLDER
8587

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.