function hook_field_formatter_settings_form


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
cle7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
elmsmedia7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
icor7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
meedjum_blog7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
mooc7 field_ui.api.php hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)

Specify the form elements for a formatter's settings.


$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.

Return value

The form elements for the formatter settings.

Related topics

21 functions implement hook_field_formatter_settings_form()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ctools_fields_get_field_formatter_settings_form in sites/all/modules/ulmus/ctools/includes/
Helper function for calling hook_field_formatter_settings_form() without needing to load an instance of the field.
date_field_formatter_settings_form in sites/all/modules/ulmus/date/
Implements hook_field_formatter_settings_form().
ds_field_formatter_settings_form in sites/all/modules/ulmus/ds/includes/
Implements hook_field_formatter_settings_form().
entityreference_field_formatter_settings_form in sites/all/modules/ulmus/entityreference/entityreference.module
Implements hook_field_formatter_settings_form().
field_collection_fieldset_field_formatter_settings_form in sites/all/modules/ulmus/field_collection_fieldset/field_collection_fieldset.module
Implements hook_field_formatter_settings_form().

... See full list


modules/field_ui/field_ui.api.php, line 151
Hooks provided by the Field UI module.


function hook_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];

  $element = array();

  if ($display['type'] == 'text_trimmed' || $display['type'] == 'text_summary_or_trimmed') {
    $element['trim_length'] = array(
      '#title' => t('Length'),
      '#type' => 'textfield',
      '#size' => 20,
      '#default_value' => $settings['trim_length'],
      '#element_validate' => array('element_validate_integer_positive'),
      '#required' => TRUE,

  return $element;




Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.