You are here

function sheetnode_handler_field_range::options_form in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 views/sheetnode_handler_field_range.inc \sheetnode_handler_field_range::options_form()
  2. 7 views/sheetnode_handler_field_range.inc \sheetnode_handler_field_range::options_form()

File

views/sheetnode_handler_field_range.inc, line 12

Class

sheetnode_handler_field_range

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['reference'] = array(
    '#type' => 'textfield',
    '#title' => t('Range reference'),
    '#default_value' => $this->options['reference'],
    '#description' => t('Use the format A1:C4 for a cell range, A for whole column, 1 for whole row.'),
  );
  $form['labels'] = array(
    '#type' => 'radios',
    '#title' => t('Labels'),
    '#options' => array(
      0 => t('None'),
      SHEETNODE_RANGE_LABELS_ROW => t('Rows only'),
      SHEETNODE_RANGE_LABELS_COL => t('Columns only'),
      SHEETNODE_RANGE_LABELS_ROW_COL => t('Rows and columns'),
    ),
    '#default_value' => $this->options['labels'],
    '#description' => t('Select whether row or column labels should appear.'),
  );
  $form['raw'] = array(
    '#type' => 'checkbox',
    '#title' => t('Raw value'),
    '#default_value' => $this->options['raw'],
    '#description' => t('Return raw PHP cell array instead of themed value. Useful for inserting into an output spreadsheet.'),
  );
}