function views_handler_field_file::options_form

3.x views_handler_field_file.inc views_handler_field_file::options_form(&$form, &$form_state)
2.x views_handler_field_file.inc views_handler_field_file::options_form(&$form, &$form_state)

Provide link to file option

Overrides views_handler_field::options_form

File

modules/system/views_handler_field_file.inc, line 25

Class

views_handler_field_file
Field handler to provide simple renderer that allows linking to a file.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['link_to_file'] = array(
    '#title' => t('Link this field to download the file'),
    '#description' => t('This will override any other link you have set.'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_to_file']),
  );
}