You are here

function bigint_field_formatter_settings_form in Big Integer 7

Implements hook_field_formatter_settings_form().

File

./bigint.module, line 165
Defines numeric field types.

Code

function bigint_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  if ($display['type'] == 'number_bigint') {
    $options = array(
      '' => t('<none>'),
      '.' => t('Decimal point'),
      ',' => t('Comma'),
      ' ' => t('Space'),
      "'" => t('Apostrophe'),
    );
    $element['thousand_separator'] = array(
      '#type' => 'select',
      '#title' => t('Thousand marker'),
      '#options' => $options,
      '#default_value' => $settings['thousand_separator'],
    );
    $element['prefix_suffix'] = array(
      '#type' => 'checkbox',
      '#title' => t('Display prefix and suffix.'),
      '#default_value' => $settings['prefix_suffix'],
    );
  }
  return $element;
}