### Eclipse Workspace Patch 1.0
#P drupal_test_7
Index: modules/field/field.form.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v
retrieving revision 1.5
diff -u -r1.5 field.form.inc
--- modules/field/field.form.inc	10 Mar 2009 09:45:31 -0000	1.5
+++ modules/field/field.form.inc	16 Mar 2009 20:33:35 -0000
@@ -316,7 +316,7 @@
   }
 
   // Retrieve the cached form.
-  $form_state = array('submitted' => FALSE);
+  $form_state = form_state_defaults();
   $form_build_id = $_POST['form_build_id'];
   $form = form_get_cache($form_build_id, $form_state);
   if (!$form) {
@@ -352,7 +352,7 @@
   // $form_state, so we use copies of $form and $form_state.
   $form_copy = $form;
   $form_state_copy = $form_state;
-  $form_copy['#post'] = array();
+  $form_state_copy['input'] = array();
   form_builder($_POST['form_id'], $form_copy, $form_state_copy);
   // Just grab the data we need.
   $form_state['values'] = $form_state_copy['values'];
@@ -390,11 +390,8 @@
   // render the new element.
   $delta = max(array_keys($_POST[$field_name])) + 1;
   $_POST[$field_name][$delta]['_weight'] = $delta;
-  $form_state = array('submitted' => FALSE);
-  $form += array(
-    '#post' => $_POST,
-    '#programmed' => FALSE,
-  );
+  $form_state = form_state_defaults();
+  $form_state['input'] = $_POST;
   $form = form_builder($_POST['form_id'], $form, $form_state);
 
   // Render the new output.
