You are here

function shs_field_formatter_settings_form in Simple hierarchical select 7

Implements hook_field_formatter_settings_form().

File

./shs.module, line 712
Provides an additional widget for term fields to create hierarchical selects.

Code

function shs_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $element = array();
  if ($display['type'] == 'shs_default') {
    $element['linked'] = array(
      '#title' => t('Link to term page'),
      '#type' => 'checkbox',
      '#default_value' => $settings['linked'],
    );
  }
  return $element;
}