You are here

public function views_handler_field_counter::options_form in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_field_counter.inc \views_handler_field_counter::options_form()
  2. 6.2 handlers/views_handler_field_counter.inc \views_handler_field_counter::options_form()

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

Overrides views_handler_field::options_form

File

handlers/views_handler_field_counter.inc, line 28
Definition of views_handler_field_counter.

Class

views_handler_field_counter
Field handler to show a counter of the current row.

Code

public function options_form(&$form, &$form_state) {
  $form['counter_start'] = array(
    '#type' => 'textfield',
    '#title' => t('Starting value'),
    '#default_value' => $this->options['counter_start'],
    '#description' => t('Specify the number the counter should start at.'),
    '#size' => 2,
  );
  $form['reverse'] = array(
    '#type' => 'checkbox',
    '#title' => t('Reverse'),
    '#default_value' => $this->options['reverse'],
    '#description' => t('Reverse the counter.'),
  );
  parent::options_form($form, $form_state);
}