You are here

function similarterms_handler_field_similar::options_form in Similar By Terms 7.2

Same name and namespace in other branches
  1. 6.2 views/similarterms_handler_field_similar.inc \similarterms_handler_field_similar::options_form()

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

Overrides views_handler_field::options_form

File

views/similarterms_handler_field_similar.inc, line 16

Class

similarterms_handler_field_similar
Shows the similarity of the node.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['count_type'] = array(
    '#type' => 'radios',
    '#title' => t('Display type'),
    '#default_value' => $this->options['count_type'],
    '#options' => array(
      0 => t('Show count of common terms'),
      1 => t('Show as percentage'),
    ),
  );
  $form['percent_suffix'] = array(
    '#type' => 'checkbox',
    '#title' => t('Append % when showing percentage'),
    '#default_value' => !empty($this->options['percent_suffix']),
  );
}