#52292 by hunmonk, multipart node forms broken

Adds a new form attribute that lets form writers hook into a conveniant place when the form building requires knowledge of the validation results.
4.7.x
Neil Drumm 2006-03-09 22:55:01 +00:00
parent 2b9d04d5c2
commit c828449991
1 changed files with 9 additions and 0 deletions

View File

@ -134,6 +134,15 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
elseif (theme_get_function($callback)) {
$form['#theme'] = $callback;
}
if (isset($form['#pre_render'])) {
foreach ($form['#pre_render'] as $function) {
if (function_exists($function)) {
$function($form_id, $form);
}
}
}
return form_render($form);
}