function mathfield_mathfield_get_token_value in Math Field 7
Implements hook_mathfield_get_token_value().
Related topics
File
- ./
mathfield.module, line 668 - Adds a dynamic math expression field.
Code
function mathfield_mathfield_get_token_value($context) {
$values = $context['form_state']['values'];
$field_name = $context['field_name'];
$language = $context['element']['#language'];
$delta = $context['delta'];
$column = $context['column'];
if (isset($values[$field_name][$language][$delta][$column]) && is_numeric($values[$field_name][$language][$delta][$column])) {
return $values[$field_name][$language][$delta][$column];
}
return FALSE;
}