You are here

function hook_ds_field_settings_form in Display Suite 7

Same name and namespace in other branches
  1. 7.2 ds.api.php \hook_ds_field_settings_form()

Return a settings form for a Display Suite field.

As soon as you have hook_ds_fields and one of the fields has a settings key, Display Suite will call this hook for field form.

Parameters

$field: The configuration of the field.

Return value

$form A form definition.

2 functions implement hook_ds_field_settings_form()

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

ds_ds_field_settings_form in ./ds.field_ui.inc
Implements hook_ds_field_settings_form().
ds_extras_ds_field_settings_form in modules/ds_extras/ds_extras.admin.inc
Implements hook_ds_field_settings_form().
1 invocation of hook_ds_field_settings_form()
ds_field_settings_form in ./ds.field_ui.inc
Creates a form for Display Suite fields. .

File

./ds.api.php, line 349
Hooks provided by Display Suite module.

Code

function hook_ds_field_settings_form($field) {

  // Saved formatter settings are on $field['formatter_settings'];
  $settings = isset($field['formatter_settings']) ? $field['formatter_settings'] : $field['properties']['default'];
  $form['label'] = array(
    '#type' => 'textfield',
    '#title' => t('Label'),
    '#default_value' => $settings['label'],
  );
}