Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.124.2.65
diff -u -r1.124.2.65 webform.module
--- webform.module	30 Oct 2008 22:08:08 -0000	1.124.2.65
+++ webform.module	1 Nov 2008 10:49:46 -0000
@@ -1610,6 +1610,11 @@
   // Check for a multi-page form that is not yet complete.
   $submit_op = empty($node->webform['submit_text']) ? t('Submit') : $node->webform['submit_text'];
   if ($form_state['values']['op'] != $submit_op) {
+    // Process the values so they are saved in form_state correctly.
+    // Signal that we only have part of the form so values that have been submitted on another
+    // page do not get overwritten.
+    _webform_client_form_submit_process($node, $form_state['values']['submitted'], 0, TRUE);
+  
     // Store values from the current page in the form state storage.
     if (is_array($form_state['values']['submitted'])) {
       foreach ($form_state['values']['submitted'] as $key => $val) {
@@ -1823,7 +1828,7 @@
 /**
  * Post processes the submission tree with any updates from components.
  */
-function _webform_client_form_submit_process($node, &$form_values, $parent = 0) {
+function _webform_client_form_submit_process($node, &$form_values, $parent = 0, $partial_form = FALSE) {
   if (is_array($form_values)) {
     foreach ($form_values as $form_key => $value) {
       $cid = webform_get_cid($node, $form_key, $parent);
@@ -1836,7 +1841,8 @@
   // We loop through components rather than the actual submission, because
   // some components (file) do not get things submitted in the $form_values.
   foreach ($node->webform['components'] as $cid => $component) {
-    if ($component['pid'] == $parent) {
+    // When a partial form, we only process if the value is set.
+    if ($component['pid'] == $parent && (!$partial_form || isset($form_values[$component['form_key']]))) {
       $submit_function = "_webform_submit_". $component['type'];
       if (function_exists($submit_function)) {
         $submit_function($form_values[$component['form_key']], $component); // Call the component process submission function.

