You are here

function download_field_instance_settings_form in Download 7.2

Implements hook_field_instance_settings_form().

File

./download.module, line 60
Handles module administration and download link

Code

function download_field_instance_settings_form($field, $instance) {
  $settings = $instance['settings'];
  $form['filename'] = array(
    '#type' => 'textfield',
    '#title' => t('Filename for the download'),
    '#default_value' => $settings['filename'],
  );
  if (module_exists('token')) {
    $form['tokens'] = array(
      '#theme' => 'token_tree',
      '#token_types' => array(
        $instance['entity_type'],
      ),
      '#global_types' => FALSE,
    );
  }
  return $form;
}