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.
I have a filefield that allows multiple file uploads.
In the CCK filefield config options I enabled "list field" and checked "list files by default".
When I add a file to the node it displays and checks the list checkbox for the first file that is added but leaves it unchecked for each file added after the first. Should the list checkbox be checked for every file upload?
Is there a way to hide the list option so that the files are always listed on the node view?
Screenshots attached.
Comment | File | Size | Author |
---|---|---|---|
#5 | filefield_default_list.patch | 756 bytes | quicksketch |
Picture 2.png | 25.31 KB | easp | |
Picture 3.png | 46.64 KB | easp |
Comments
Comment #1
quicksketchThanks for the report. I'll see if I can confirm the problem with subsequent fields not having the list option checked by default.
If you always want the files listed, I'd suggest just turning off the "List field" entirely. The list option is only helpful if you intentionally want to not list specific files.
Comment #2
easp CreditAttribution: easp commentedTurning off the "List field" entirely worked for me. I just wanted the files to always display in the view.
Thanks for your help with this issue.
Comment #3
jzornig CreditAttribution: jzornig commentedI'm also seeing this issue. I'd like to retain the ability for users to selectively uncheck the list box, but I do want it checked by default for the first and subsequent files.
Any chance of a fix?
Comment #4
jzornig CreditAttribution: jzornig commentedI found the following "Default Value and AHAH" http://drupal.org/node/668432 which might give more insight.
If I turn off javascript in my browser, the default value for "list" checkbox is populated correctly when adding another item.
Comment #5
quicksketchThis patch corrects the problem and I've committed it to 3.x. Please reopen if you discover any problems. Thanks!