I am using the FileField paths module. It adds a field called 'origname' and Filefield paths allows me to change the file name and paths. I successfully added that field to the display in a custom module (even for a drupal coding noob pretty easy):

function mymodulename_extended_file_field_metadata_types() {
    // Start with the default file field metadata.
    $defaults = array(
      'origname' => array(
        'title' => t('File Name'),
        'sort' => 'string',
      ),
      );
return $defaults;
}

Now I would like to remove the default file display and link. The user will not be able to download these uploaded files and I only want them to see the file name that they uploaded.

Comments

jthorson’s picture

Status: Active » Fixed

Hopefully you figured this out ... but in case others following have the same question, one approach to do this would be to implement hook_extended_file_field_output_alter(&$elements, &$context). This hook allows you to modify the final table structure prior to rendering the final extended_file_field formatter output; and allows for everything from adding or hiding particular items to re-structuring the entire output table.

An example implementation and documentation for the function can be found inside extended_file_field.api.php.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.