function number_field_info
Implements hook_field_info().
File
-
modules/
field/ modules/ number/ number.module, line 24
Code
function number_field_info() {
return array(
'number_integer' => array(
'label' => t('Integer'),
'description' => t('This field stores a number in the database as an integer.'),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'number',
'default_formatter' => 'number_integer',
),
'number_decimal' => array(
'label' => t('Decimal'),
'description' => t('This field stores a number in the database in a fixed decimal format.'),
'settings' => array(
'precision' => 10,
'scale' => 2,
'decimal_separator' => '.',
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'number',
'default_formatter' => 'number_decimal',
),
'number_float' => array(
'label' => t('Float'),
'description' => t('This field stores a number in the database in a floating point format.'),
'settings' => array(
'decimal_separator' => '.',
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'number',
'default_formatter' => 'number_decimal',
),
);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.