-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added caution block under delete_empty to warn the developer when he try to activate delete_empty for collections of compound forms #7767
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
Changes from 1 commit
b9e375c
ca04555
de25ede
52c0a94
ce30e47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…try to activate delete_empty for collections of compound forms.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,6 +268,13 @@ delete_empty | |
|
||
**type**: ``Boolean`` **default**: ``false`` | ||
|
||
.. caution:: | ||
|
||
Delete empty will only remove items when the normalized value is null. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would either say: The ``delete_empty`` option will... or "This option will ...". |
||
If your `type`_ is a compound form type, you need to have the :ref:`required <reference-form-option-required>` | ||
option set to ``false`` inside `options`_, See :ref:`empty_data <reference-form-option-empty-data>`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add: or ``empty_data`` option explicitly set to null. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also mention that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the above text, when I mean 'options' I'm referring to 'entry_options', it is because I'm making the pull request to syfmony 2.7. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "inside options" could be removed, but let's wait for other reviewers opinion before rewording it. |
||
|
||
|
||
If you want to explicitly remove entirely empty collection entries from your | ||
form you have to set this option to true. However, existing collection entries | ||
will only be deleted if you have the allow_delete_ option enabled. Otherwise | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block should be added after the description.