--- form.inc	2008-06-25 11:58:09.000000000 +0200
+++ form.inc	2008-07-10 21:17:07.000000000 +0200
@@ -973,7 +973,14 @@
       foreach ($form['#parents'] as $parent) {
         $edit = isset($edit[$parent]) ? $edit[$parent] : NULL;
       }
-      if (!$form['#programmed'] || isset($edit)) {
+      $is_checkbox = $form['#type'] == 'checkbox' || $form['#type'] == 'checkboxes';
+      if (!empty($form['#attributes']['disabled']) || (!isset($edit) && (!$is_checkbox || $form['#programmed']))) {
+         // We pick the default value in three circumstances:
+         // 1. The field is reported to be disabled; or
+         // 2. No input is available and this isn't a checkbox; or
+         // 2. No input is available, this is a checkbox, and the form is programmed.
+       }
+       else {
         // Call #type_value to set the form value;
         if (function_exists($function)) {
           $form['#value'] = $function($form, $edit);
