1.20.x date.api.php hook_date_field_instance_settings_form_alter(&$form, $context)

Alter a date field instance settings form.

Parameters

array $form: Nested array of form elements that comprise the form.

array $context: An associative array containing the following keys:

  • field: The $field array.
  • instance: The $instance array.

See also

hook_field_instance_settings_form()

File

modules/date/date.api.php, line 415
Hooks provided by the Date module.

Code

function hook_date_field_instance_settings_form_alter(&$form, $context) {
  $field = $context['field'];
  $instance = $context['instance'];
  $form['new_setting'] = array(
    '#type' => 'textfield',
    '#default_value' => '',
    '#title' => t('My new setting'),
  );
}