1 field.api.php hook_field_formatter_settings_form_alter(&$settings_form, $context)

Alter the form elements for a formatter's settings.

@since 1.13.0

Parameters

$context: An array of additional context for the settings form, containing:

  • module: The module providing the formatter being configured.
  • formatter: The definition array of the formatter being configured. Note that this does not contain the machine name of the formatter. This can be found in:
    $context['instance']['display'][$context['view_mode']]['type']
    
  • field: The field structure being configured.
  • instance: The instance structure being configured.
  • view_mode: The view mode being configured.
  • form: The (entire) configuration form array, which will usually have no use here.
  • form_state: The form state of the (entire) configuration form.

See also

hook_field_formatter_settings()

Related topics

File

core/modules/field/field.api.php, line 1264
Hooks provided by the Field module.

Code

function hook_field_formatter_settings_form_alter(&$settings_form, $context) {

}