function rules_ui_element_duration_after_build in Rules 7.2
FAPI after build callback for the duration parameter type form.
Fixes up the form value by applying the multiplier.
2 string references to 'rules_ui_element_duration_after_build'
- RulesDataUIDuration::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- rules_element_info in ./
rules.module - Implements hook_element_info().
File
- ui/
ui.forms.inc, line 827 - Rules User Interface forms.
Code
function rules_ui_element_duration_after_build($element, &$form_state) {
if ($element['value']['#value'] !== '') {
$element['#value'] = $element['value']['#value'] * $element['multiplier']['#value'];
form_set_value($element, $element['#value'], $form_state);
}
else {
$element['#value'] = NULL;
form_set_value($element, NULL, $form_state);
}
return $element;
}