Skip to content
Snippets Groups Projects
Commit 58db005b authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

Forward port from 4.7

#60797, moved comment, patch by Zen
parent d6b538ef
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -504,6 +504,7 @@ function form_render(&$elements) {
$previous_value = $elements['#value'];
$previous_type = $elements['#type'];
// If we rendered a single element, then we will skip the renderer.
if (empty($children)) {
$elements['#printed'] = TRUE;
}
......@@ -516,7 +517,6 @@ function form_render(&$elements) {
$elements['#value'] = $previous_value;
$elements['#type'] = $previous_type;
// if we rendered a single element, then we will skip the renderer
unset($elements['#prefix'], $elements['#suffix']);
}
/* render each of the children using form_render and concatenate them */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment