You are here

function filefield_paths_filefield_paths_field_settings in File (Field) Paths 7

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

Implements hook_filefield_paths_field_settings().

Parameters

$field:

$instance:

Return value

array

File

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

Code

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