? value_callback_documentation-447930.patch
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.461
diff -u -p -r1.461 form.inc
--- includes/form.inc	7 May 2010 14:48:10 -0000	1.461
+++ includes/form.inc	10 May 2010 22:39:32 -0000
@@ -1404,6 +1404,14 @@ function form_builder($form_id, $element
 /**
  * Populate the #value and #name properties of input elements so they
  * can be processed and rendered.
+ *
+ * Each input element may pass an optional #value_callback argument to specify 
+ * a function through which input data is filtered before being passed to the
+ * #value property. If no #value_callback argument is present, a default
+ * callback is attempted based upon the input element's #type property:
+ *   'form_type_' . $element['#type'] . '_value';
+ * Such callbacks are passed three values: $element, $input, and $form_state:
+ *   $element['#value'] = $value_callback($element, $input, $form_state);
  */
 function _form_builder_handle_input_element($form_id, &$element, &$form_state) {
   if (!isset($element['#name'])) {
@@ -1733,7 +1741,7 @@ function form_type_image_button_value($f
 /**
  * Helper function to determine the value for a checkbox form element.
  *
- * @param $form
+ * @param $element
  *   The form element whose value is being populated.
 *  @param $input
  *   The incoming input to populate the form element. If this is FALSE,
