Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.265.2.4
diff -u -r1.265.2.4 form.inc
--- includes/form.inc	11 Feb 2008 14:45:57 -0000	1.265.2.4
+++ includes/form.inc	6 Mar 2008 17:57:43 -0000
@@ -972,7 +972,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);
