You are here

function tzfield_field_formatter_settings_form in Time Zone Field 7

Implements hook_field_formatter_settings_form().

File

./tzfield.module, line 224
Defines a time zone field type.

Code

function tzfield_field_formatter_settings_form($field, $instance, $view_mode) {
  $form = array();
  if ($instance['display'][$view_mode]['type'] == 'tzfield_date') {
    $form['format'] = array(
      '#title' => t('Format'),
      '#type' => 'textfield',
      '#size' => 20,
      '#default_value' => $instance['display'][$view_mode]['settings']['format'],
      '#description' => t('Enter a <a rel="noreferrer" href="https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters">PHP date format string</a>, e.g. <em>T</em> to display the current time zone abbreviation.'),
    );
  }
  return $form;
}