diff --git a/core/includes/form.inc b/core/includes/form.inc index 8b1a7d2..d73dbd3 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -2239,32 +2239,32 @@ function form_type_checkbox_value($element, $input = FALSE) { } /** - * Form value callback to determine the value for a radios form element. + * Form value callback: Determines the value for a radio form element. * * @param $element * The form element whose value is being populated. * @param $input - * The incoming input to populate the form element. If this is FALSE, the - * element's default value is returned. + * (optional) The incoming input to populate the form element. If FALSE, the + * element's default value is returned. Defaults to FALSE. * * @return * The data that will appear in the $element_state['values'] collection for - * this element. If NULL is returned and #has_garbage_value is not set then - * it will automatically attempt to use default value or ''. - */ + * this element. +*/ function form_type_radios_value(&$element, $input = FALSE) { - // If there is data coming from form submission. + // If there is data from a form submission, use that. if ($input !== FALSE) { // Check if the user submission had no value for this element. if (!isset($input)) { // Flag as a garbage value so that form builder will not automatically - // replace the our NULL with an empty string. + // replace the NULL value with an empty string. $element['#has_garbage_value'] = TRUE; // There was a user submission so validation is a must. This way, the // required checker will produce an error as necessary. $element['#needs_validation'] = TRUE; } - // The value stays the same, but the flags above will process it properly. + // The value stays the same, but the flags above will ensure it is + // processed properly. return $input; }