Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The choice to set a Select box to default "None" when clicking Edit Field Collection at Manage Content types is missing. I think this happened after we set the actual Select Field to required. Afterwards, setting the Select Field back to optional revealed the "- None -" option in the actual fields config, but looking at field collections edit page still only shows the manually set "Allowed values list".
http://dl.dropbox.com/u/2188345/fc.png
http://dl.dropbox.com/u/2188345/fc2.png
Images not displaying properly for some reason even if allowed tags lists img tag meh.
Comment | File | Size | Author |
---|---|---|---|
#3 | select_default.png | 4.54 KB | mropanen |
#3 | select_in_form.png | 2.29 KB | mropanen |
Comments
Comment #1
rnyberg CreditAttribution: rnyberg commentedSince there has been no replies, I worked around the bug by implementing a node_presave hook to delete field collections that are "Empty" (created a new select option for that). Since with this bug, every time you'd save a node, you'd get an extra empty field collection appear on the bottom due the "None" choice not being selected for the last "Add another item" row.
Comment #2
jenesis CreditAttribution: jenesis commentedImho quite critical.
Temp workaround is to use taxonomy link field instead of select field.
Comment #3
mropanen CreditAttribution: mropanen commentedQuite critical indeed.
Attached are: picture of a newly-created select list in the field collection settings (select_default.png) where you can see that the default value can be set to "- None -". However, in the actual node form (select_in_form.png) no such option appears.
This means that the field collection is never truly empty, and will be saved on submit unless the user manually removes it (thank you for that button!)
Comment #4
tim.plunkettIs your individual field required?
Is the field collection field required?
Comment #5
jmuzz CreditAttribution: jmuzz commentedIt is no longer possible to set defaults through the manage content section, it must be done through the manage fields page of the field collection itself now.
Please reopen if I'm wrong but I think this is no longer an issue.