You are here

function synonyms_views_handler_field_synonyms::options_form in Synonyms 7

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

views/synonyms_views_handler_field_synonyms.inc, line 28
Definition of synonyms_handler_field_synonyms class.

Class

synonyms_views_handler_field_synonyms
Views field handler for displaying synonyms of an entity.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['list'] = array(
    '#type' => 'radios',
    '#title' => t('Display type'),
    '#options' => array(
      'ul' => t('Unordered list'),
      'ol' => t('Ordered list'),
      'separator' => t('Simple separator'),
    ),
    '#default_value' => $this->options['list'],
  );
  $form['separator'] = array(
    '#type' => 'textfield',
    '#title' => t('Separator'),
    '#default_value' => $this->options['separator'],
    '#dependency' => array(
      'radio:options[list]' => array(
        'separator',
      ),
    ),
  );
}