Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.981
diff -u -r1.981 system.module
--- modules/system/system.module	15 Oct 2010 04:40:41 -0000	1.981
+++ modules/system/system.module	19 Oct 2010 20:12:04 -0000
@@ -332,6 +332,7 @@
     '#button_type' => 'submit',
     '#executes_submit_callback' => TRUE,
     '#limit_validation_errors' => FALSE,
+    '#value_callback' => 'form_type_image_button_value',
     '#process' => array('ajax_process_form'),
     '#return_value' => TRUE,
     '#has_garbage_value' => TRUE,
@@ -343,6 +344,7 @@
     '#size' => 60,
     '#maxlength' => 128,
     '#autocomplete_path' => FALSE,
+    '#value_callback' => 'form_type_textfield_value',
     '#process' => array('ajax_process_form'),
     '#theme' => 'textfield',
     '#theme_wrappers' => array('form_element'),
@@ -369,6 +371,7 @@
   );
   $types['password_confirm'] = array(
     '#input' => TRUE,
+    '#value_callback' => 'form_type_password_confirm_value',
     '#process' => array('form_process_password_confirm', 'user_form_process_password_confirm'),
     '#theme_wrappers' => array('form_element'),
   );
@@ -397,6 +400,7 @@
   );
   $types['checkboxes'] = array(
     '#input' => TRUE,
+    '#value_callback' => 'form_type_checkboxes_value',
     '#process' => array('form_process_checkboxes'),
     '#theme_wrappers' => array('checkboxes'),
     '#pre_render' => array('form_pre_render_conditional_form_element'),
@@ -404,6 +408,7 @@
   $types['checkbox'] = array(
     '#input' => TRUE,
     '#return_value' => 1,
+    '#value_callback' => 'form_type_checkbox_value',
     '#process' => array('ajax_process_form'),
     '#theme' => 'checkbox',
     '#theme_wrappers' => array('form_element'),
@@ -412,6 +417,7 @@
   $types['select'] = array(
     '#input' => TRUE,
     '#multiple' => FALSE,
+    '#value_callback' => 'form_type_select_value',
     '#process' => array('form_process_select', 'ajax_process_form'),
     '#theme' => 'select',
     '#theme_wrappers' => array('form_element'),
@@ -493,6 +499,7 @@
   $types['token'] = array(
     '#input' => TRUE,
     '#theme' => 'hidden',
+    '#value_callback' => 'form_type_token_value',
   );
 
   return $types;
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.503
diff -u -r1.503 form.inc
--- includes/form.inc	13 Oct 2010 13:43:21 -0000	1.503
+++ includes/form.inc	19 Oct 2010 20:12:00 -0000
@@ -1498,8 +1498,7 @@
  * modules to customize what happens. For example, during this function's life
  * cycle, the following functions get called for each element:
  * - $element['#value_callback']: A function that implements how user input is
- *   mapped to an element's #value property. This defaults to a function named
- *   'form_type_TYPE_value' where TYPE is $element['#type'].
+ *   mapped to an element's #value property.
  * - $element['#process']: An array of functions called after user input has
  *   been mapped to the element's #value property. These functions can be used
  *   to dynamically add child elements: for example, for the 'date' element
@@ -1814,7 +1813,6 @@
 
   // Set the element's #value property.
   if (!isset($element['#value']) && !array_key_exists('#value', $element)) {
-    $value_callback = !empty($element['#value_callback']) ? $element['#value_callback'] : 'form_type_' . $element['#type'] . '_value';
     if ($process_input) {
       // Get the input for the current element. NULL values in the input need to
       // be explicitly distinguished from missing input. (see below)
@@ -1838,8 +1836,8 @@
       // If we have input for the current element, assign it to the #value
       // property, optionally filtered through $value_callback.
       if ($input_exists) {
-        if (function_exists($value_callback)) {
-          $element['#value'] = $value_callback($element, $input, $form_state);
+        if (!empty($element['#value_callback'])) {
+          $element['#value'] = $element['#value_callback']($element, $input, $form_state);
         }
         if (!isset($element['#value']) && isset($input)) {
           $element['#value'] = $input;
@@ -1853,8 +1851,8 @@
     // Load defaults.
     if (!isset($element['#value'])) {
       // Call #type_value without a second argument to request default_value handling.
-      if (function_exists($value_callback)) {
-        $element['#value'] = $value_callback($element, FALSE, $form_state);
+      if (!empty($element['#value_callback'])) {
+        $element['#value'] = $element['#value_callback']($element, FALSE, $form_state);
       }
       // Final catch. If we haven't set a value yet, use the explicit default value.
       // Avoid image buttons (which come with garbage value), so we only get value
