You are here

function datex_date_date_field_instance_settings_form_alter in Datex 7

Implements hook_date_field_instance_settings_form_alter().

For per-field control.

File

datex_date/datex_date.module, line 163
Provides Jalali support for date module.

Code

function datex_date_date_field_instance_settings_form_alter(&$form, $context) {
  $settings = $context['instance']['settings'];
  $default = isset($settings['datex_enabled']) ? $settings['datex_enabled'] : 'site';
  $form['datex_enabled'] = array(
    '#title' => t('Enable datex on this field:'),
    '#type' => 'select',
    '#options' => array(
      'enabled' => t('Force enable, Ignoring site-wide datex config'),
      'disabled' => t('Force disable, Ignoring site-wide datex config'),
      'site' => t('Follow site-wide configuration'),
    ),
    '#default_value' => $default,
  );
}