You are here

function getid3_handler_field_bitrate::options_form in getID3() 7

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

Overrides views_handler_field_numeric::options_form

File

includes/getid3_handler_field_bitrate.inc, line 24
A special handler that properly formats bit rate fields as Kbps.

Class

getid3_handler_field_bitrate
Render a field as a readable value in hours, minutes, and seconds.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // Remove the separator and alter options since we don't need them.
  unset($form['separator']);
  $form['prefix']['#weight'] = 10;
  $form['suffix']['#weight'] = 10;
  $form['format'] = array(
    '#type' => 'select',
    '#title' => t('Format'),
    '#default_value' => $this->options['format'],
    '#options' => array(
      'default' => t('Default (Mbps or Kbps)'),
      'raw' => t('Raw numberic value'),
    ),
  );
}