summaryrefslogtreecommitdiff
path: root/includes/form.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-04-26 18:21:07 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-04-26 18:21:07 +0000
commitb538ba870b04f26b0870c194df44241a1595e7dd (patch)
treed4dc65f918ab5347f0cf57eb331938cc028bb315 /includes/form.inc
parent83e279a7b8b60d93933c526aa99cf9d169ecd27e (diff)
downloadbrdo-b538ba870b04f26b0870c194df44241a1595e7dd.tar.gz
brdo-b538ba870b04f26b0870c194df44241a1595e7dd.tar.bz2
#60370: #theme callback on element broken
Diffstat (limited to 'includes/form.inc')
-rw-r--r--includes/form.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index ea41b572e..2c3344f6c 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -498,13 +498,21 @@ function form_render(&$elements) {
uasort($elements, "_form_sort");
if (!isset($elements['#children'])) {
- /* render all the children using a theme function */
+ /* Render all the children that use a theme function */
if (isset($elements['#theme']) && !$elements['#theme_used']) {
$elements['#theme_used'] = TRUE;
+
+ $previous_value = $elements['#value'];
$previous_type = $elements['#type'];
+ $elements['#value'] = '';
$elements['#type'] = 'markup';
+
$content = theme($elements['#theme'], $elements);
+
+ $elements['#value'] = $previous_value;
$elements['#type'] = $previous_type;
+
+ unset($elements['#prefix'], $elements['#suffix']);
}
/* render each of the children using form_render and concatenate them */
if (!$content) {