=== modified file 'includes/form.inc'
--- includes/form.inc	
+++ includes/form.inc	
@@ -553,7 +553,7 @@ function form_options_flatten($array, $r
 function theme_select($element) {
   $select = '';
   $size = $element['#size'] ? ' size="' . $element['#size'] . '"' : '';
-  return theme('form_element', $element['#title'], '<select class="' . _form_get_class('', $element['#required'], form_get_error($element)). '" name="'. $element['#name'] .''. ($element['#multiple'] ? '[]' : '') .'"'. ($element['#multiple'] ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) .' id="' . $element['#id'] .'" '. $size .'>'. form_select_options($element) .'</select>', $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<select class="' . _form_get_class('', $element['#required'], form_get_error($element)). '" name="'. $element['#name'] .''. ($element['#multiple'] ? '[]' : '') .'"'. ($element['#multiple'] ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) .' id="' . $element['#id'] .'" '. $size .'>'. form_select_options($element) .'</select>');
 }
 
 function form_select_options($element, $choices = NULL) {
@@ -605,7 +605,6 @@ function theme_fieldset($element) {
   }
 
   return '<fieldset' . drupal_attributes($element['#attributes']) .'>' . ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . ($element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . $element['#children'] . $element['#value'] . "</fieldset>\n";
-
 }
 
 /**
@@ -627,7 +626,9 @@ function theme_radio($element) {
   if (!is_null($element['#title'])) {
     $output = '<label class="option">'. $output .' '. $element['#title'] .'</label>';
   }
-  return theme('form_element', NULL, $output, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+
+  unset($element['#title']);
+  return theme('form_element', $element, $output);
 }
 
 /**
@@ -641,7 +642,7 @@ function theme_radio($element) {
  */
 function theme_radios($element) {
   if ($element['#title'] || $element['#description']) {
-    return theme('form_element', $element['#title'], $element['#children'], $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+    return theme('form_element', $element, $element['#children']);
   }
   else {
     return $element['#children'];
@@ -658,7 +659,7 @@ function theme_radios($element) {
  *   A themed HTML string representing the form item.
  */
 function theme_password_confirm($element) {
-  return theme('form_element', $element['#title'], '<div class="container-inline">'. $element['#children']. '</div>', $element['#description'],  $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<div class="container-inline">'. $element['#children']. '</div>');
 }
 
 /**
@@ -693,8 +694,7 @@ function password_confirm_validate($form
  *   A themed HTML string representing the date selection boxes.
  */
 function theme_date($element) {
-  $output = '<div class="container-inline">' . $element['#children'] . '</div>';
-  return theme('form_element', $element['#title'], $output, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<div class="container-inline">' . $element['#children'] . '</div>');
 }
 
 /**
@@ -800,7 +800,7 @@ function expand_radios($element) {
  *   A themed HTML string representing the form item.
  */
 function theme_item($element) {
-  return theme('form_element', $element['#title'], $element['#value'] . $element['#children'], $element['#description'], $element['#id'], $element['#required'], $element['#error']);
+  return theme('form_element', $element, $element['#value'] . $element['#children']);
 }
 
 /**
@@ -826,7 +826,8 @@ function theme_checkbox($element) {
     $checkbox = '<label class="option">'. $checkbox .' '. $element['#title'] .'</label>';
   }
 
-  return theme('form_element', NULL, $checkbox, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  unset($element['#title']);
+  return theme('form_element', $element, $checkbox);
 }
 
 /**
@@ -839,7 +840,7 @@ function theme_checkbox($element) {
  */
 function theme_checkboxes($element) {
   if ($element['#title'] || $element['#description']) {
-    return theme('form_element', $element['#title'], $element['#children'], $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+    return theme('form_element', $element, $element['#children']);
   }
   else {
     return $element['#children'];
@@ -874,8 +875,9 @@ function theme_button($element) {
   else {
     $element['#attributes']['class'] = 'form-'. $element['#button_type'];
   }
-  
-  return '<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
+
+  $element['#children'] = '<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
+  return $element['#children'];
 }
 
 /**
@@ -888,7 +890,8 @@ function theme_button($element) {
  *   A themed HTML string representing the hidden form field.
  */
 function theme_hidden($element) {
-  return '<input type="hidden" name="'. $element['#name'] . '" value="'. check_plain($element['#value']) ."\" " . drupal_attributes($element['#attributes']) ." />\n";
+  $element['#children'] = '<input type="hidden" name="'. $element['#name'] . '" value="'. check_plain($element['#value']) ."\" " . drupal_attributes($element['#attributes']) ." />\n";
+  return $element['#children'];
 }
 
 /**
@@ -911,7 +914,7 @@ function theme_textfield($element) {
   }
 
   $output = '<input type="text" maxlength="'. $element['#maxlength'] .'" class="'. _form_get_class("form-text$class", $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. $size .' value="'. check_plain($element['#value']) .'"'. drupal_attributes($element['#attributes']) .' />';
-  return theme('form_element', $element['#title'], $output, $element['#description'], $element['#id'], $element['#required'], form_get_error($element)). $extra;
+  return theme('form_element', $element, $output). $extra;
 }
 
 /**
@@ -926,7 +929,8 @@ function theme_textfield($element) {
 function theme_form($element) {
   // Anonymous div to satisfy XHTML compliancy.
   $action = $element['#action'] ? 'action="' . check_url($element['#action']) . '" ' : '';
-  return '<form '. $action . ' method="'. $element['#method'] .'" '. 'id="'. $element['#id'] .'"'.  drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n";
+  $element['#children'] = '<form '. $action . ' method="'. $element['#method'] .'" '. 'id="'. $element['#id'] .'"'.  drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n";
+  return $element['#children'];
 }
 
 /**
@@ -947,7 +951,7 @@ function theme_textarea($element) {
 
   $cols = $element['#cols'] ? ' cols="'. $element['#cols'] .'"' : '';
 
-  return theme('form_element', $element['#title'], '<textarea'. $cols .' rows="'. $element['#rows'] .'" name="'. $element['#name'] .'" id="' . $element['#id'] .'" class="'. _form_get_class($class, $element['#required'], form_get_error($element)) .'"'. drupal_attributes($element['#attributes']) .'>'. check_plain($element['#value']) .'</textarea>', $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<textarea'. $cols .' rows="'. $element['#rows'] .'" name="'. $element['#name'] .'" id="' . $element['#id'] .'" class="'. _form_get_class($class, $element['#required'], form_get_error($element)) .'"'. drupal_attributes($element['#attributes']) .'>'. check_plain($element['#value']) .'</textarea>');
 }
 
 /**
@@ -957,13 +961,14 @@ function theme_textarea($element) {
  *
  * @param $element
  *   An associative array containing the properties of the element.
- *   Properties used: prefix, value, children and suffix.
+ *   Properties used: value, children.
  * @return
  *   A themed HTML string representing the HTML markup.
  */
 
 function theme_markup($element) {
-  return $element['#value'] . $element['#children'];
+  $element['#children'] = $element['#value'] . $element['#children'];
+  return $element['#children'];
 }
 
 /**
@@ -978,9 +983,7 @@ function theme_markup($element) {
 function theme_password($element) {
   $size = $element['#size'] ? ' size="'. $element['#size'] .'" ' : '';
 
-  $output = '<input type="password" maxlength="'. $element['#maxlength'] .'" class="'. _form_get_class('form-text', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. $size . drupal_attributes($element['#attributes']) .' />';
-
-  return theme('form_element', $element['#title'], $output, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<input type="password" maxlength="'. $element['#maxlength'] .'" class="'. _form_get_class('form-text', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. $size . drupal_attributes($element['#attributes']) .' />');
 }
 
 /**
@@ -1022,7 +1025,44 @@ function theme_weight($element) {
  * provided by file.inc.
  */
 function theme_file($element) {
-  return theme('form_element', $element['#title'], '<input type="file" class="'. _form_get_class('form-file', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'"'. ($element['#attributes'] ? ' '. drupal_attributes($element['#attributes']) : '') .' id="'. form_clean_id($element['#id']) .'" size="'. $element['#size'] ."\" />\n", $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
+  return theme('form_element', $element, '<input type="file" class="'. _form_get_class('form-file', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'"'. ($element['#attributes'] ? ' '. drupal_attributes($element['#attributes']) : '') .' id="'. form_clean_id($element['#id']) .'" size="'. $element['#size'] ."\" />\n");
+}
+
+/**
+ * Return a themed form element.
+ *
+ * @param element
+ *   An associative array containing the properties of the element.
+ *   Properties used: title, description, id, required
+ * @param $value
+ *   the form element's data
+ * @return
+ *   a string representing the form element
+ */
+function theme_form_element($element, $value) {
+
+  $output  = '<div class="form-item">'."\n";
+  $required = !empty($element['#required']) ? '<span class="form-required" title="'. t('This field is required.') .'">*</span>' : '';
+
+  if (!empty($element['#title'])) {
+    $title = $element['#title'];
+    if (!empty($element['#id'])) {
+      $output .= ' <label for="'. form_clean_id($element['#id']) .'">'. $title .":$required</label>\n";
+    }
+    else {
+      $output .= ' <label>'. $title .":$required</label>\n";
+    }
+  }
+
+  $output .= " $value\n";
+
+  if (!empty($element['#description'])) {
+    $output .= ' <div class="description">'. $element['#description'] ."</div>\n";
+  }
+
+  $output .= "</div>\n";
+
+  return $output;
 }
 
 function _form_get_class($name, $required, $error) {
=== modified file 'includes/theme.inc'
--- includes/theme.inc	
+++ includes/theme.inc	
@@ -601,43 +601,6 @@ function theme_node($node, $teaser = FAL
 }
 
 /**
- * Return a themed form element.
- *
- * @param $title the form element's title
- * @param $value the form element's data
- * @param $description the form element's description or explanation
- * @param $id the form element's ID used by the &lt;label&gt; tag
- * @param $required a boolean to indicate whether this is a required field or not
- * @param $error a string with an error message filed against this form element
- *
- * @return a string representing the form element
- */
-function theme_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) {
-
-  $output  = '<div class="form-item">'."\n";
-  $required = $required ? '<span class="form-required" title="'. t('This field is required.') .'">*</span>' : '';
-
-  if ($title) {
-    if ($id) {
-      $output .= ' <label for="'. form_clean_id($id) .'">'. $title .":$required</label>\n";
-    }
-    else {
-      $output .= ' <label>'. $title .":$required</label>\n";
-    }
-  }
-
-  $output .= " $value\n";
-
-  if ($description) {
-    $output .= ' <div class="description">'. $description ."</div>\n";
-  }
-
-  $output .= "</div>\n";
-
-  return $output;
-}
-
-/**
  * Return a themed submenu, typically displayed under the tabs.
  *
  * @param $links
