function mail_debugger_callback_validate in Mail Debugger 7.3
Form validate handler. Store form data to variables.
_state
Parameters
array $form:
1 string reference to 'mail_debugger_callback_validate'
- mail_debugger_callback in includes/
mail_debugger.callback.inc - Callback for drupal_get_form
File
- includes/
mail_debugger.callback.inc, line 132
Code
function mail_debugger_callback_validate($form, &$form_state) {
// $form_state['rebuild'] = TRUE;
// dpm($form_state);
// find the active page
$trigger = $form_state['triggering_element']['#name'];
$page = $form_state['mail_debugger']['active_element'][$trigger];
// Inventorize validate handlers
if (!is_array($form_state['mail_debugger']['validate_callback'][$trigger])) {
$callbacks = array(
$form_state['mail_debugger']['validate_callback'][$trigger],
);
}
else {
$callbacks = $form_state['mail_debugger']['validate_callback'][$trigger];
}
// Execute the submit handlers
foreach ($callbacks as $function_name) {
if (!function_exists($function_name)) {
continue;
}
$param = array(
$form_state['values'][$page],
$form_state['mail_debugger']['elements'][$page],
&$form_state,
);
call_user_func_array($function_name, $param);
}
}