This module extends the functionality of the core 'file' field, adding new capabilities to the file upload widget, and providing a new extendible field formatter for displaying lists of files.

The widget enhancements include:

  • A setting to disable the 'remove' button next to files in the file upload widget,
  • A setting to hide the 'operations' column from the file upload widget when empty,
  • A setting and javascript which can be used to toggle on/off the visibility of any hidden files (i.e. files with display = FALSE)

The field formatter formatter displays a table of files with associated metadata. Configuration settings on the formatter include the ability to:

  • Select which file metadata to include in the table,
  • Filter out files based on file extension,
  • Choose a table column to sort on (overriding the field sort), and
  • Customize handling of files with 'display' => FALSE in the field:
    • Exclude the files from the display completely,
    • Include the files, but apply an 'element-hidden' class to hide them from display,
    • Include the files in-line in the table, thus ignoring the 'display' parameter,
    • Exclude the files from the main table, but output them in a second table below the first, or
    • Render a second table of hidden files inside a collapsed fieldset.

In addition, the module provides two drupal_alter() hooks, allowing other modules to modify the field $items array before creating the field formatter table structure (useful for adding additional metadata), or modify the final table structure before final rendering (useful for re-ordering columns or appending additional cells on each row).

Project information

Releases