#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
parent
2b9d04d5c2
commit
c828449991
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue