function mathfield_field_info in Math Field 7
Implements hook_field_info().
File
- ./
mathfield.module, line 11 - Adds a dynamic math expression field.
Code
function mathfield_field_info() {
return array(
'mathfield' => array(
'label' => t('Math Expression'),
'description' => t('Evaluates a math expression.'),
'settings' => array(
'expression' => '',
'field_dependencies' => array(),
'precision' => 10,
'scale' => 2,
'decimal_separator' => '.',
),
'instance_settings' => array(
'read-only' => FALSE,
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'mathfield_text',
'default_formatter' => 'number_decimal',
),
);
}