You are here

function filefield_paths_filefield_paths_field_settings in File (Field) Paths 8

Same name and namespace in other branches
  1. 5 filefield_paths.module \filefield_paths_filefield_paths_field_settings()
  2. 6.2 modules/filefield_paths.inc \filefield_paths_filefield_paths_field_settings()
  3. 6 modules/filefield_paths.inc \filefield_paths_filefield_paths_field_settings()
  4. 7 modules/filefield_paths.inc \filefield_paths_filefield_paths_field_settings()

Implements hook_filefield_paths_field_settings().

File

./filefield_paths.inc, line 16
File (Field) Paths module integration.

Code

function filefield_paths_filefield_paths_field_settings($form) {
  return [
    'file_path' => [
      'title' => 'File path',
      'form' => [
        'value' => [
          '#type' => 'textfield',
          '#title' => t('File path'),
          '#maxlength' => 512,
          '#size' => 128,
          '#element_validate' => $form['settings']['file_directory']['#element_validate'],
          '#default_value' => $form['settings']['file_directory']['#default_value'],
        ],
      ],
    ],
    'file_name' => [
      'title' => 'File name',
      'form' => [
        'value' => [
          '#type' => 'textfield',
          '#title' => t('File name'),
          '#maxlength' => 512,
          '#size' => 128,
          '#default_value' => '[file:ffp-name-only-original].[file:ffp-extension-original]',
        ],
      ],
    ],
  ];
}