Index: webform.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v retrieving revision 1.133 diff -u -r1.133 webform.module --- webform.module 17 Jun 2009 23:09:57 -0000 1.133 +++ webform.module 17 Jun 2009 23:20:01 -0000 @@ -556,7 +556,7 @@ module_load_include('inc', 'webform', 'includes/webform.components'); // Insert the Webform. - db_query("INSERT INTO {webform} (nid, confirmation, confirmation_format, teaser, submit_text, submit_limit, submit_interval, email, email_from_name, email_from_address, email_subject, additional_validate, additional_submit) VALUES (%d, '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s')", $node->nid, $node->webform['confirmation'], $node->webform['confirmation_format'], $node->webform['teaser'], $node->webform['submit_text'], $node->webform['submit_limit'], $node->webform['submit_interval'], $node->webform['email'], $node->webform['email_from_name'], $node->webform['email_from_address'], $node->webform['email_subject'], $node->webform['additional_validate'], $node->webform['additional_submit']); + db_query("INSERT INTO {webform} (nid, confirmation, confirmation_format, teaser, submit_text, submit_limit, submit_interval, additional_validate, additional_submit) VALUES (%d, '%s', %d, %d, '%s', %d, %d, '%s', '%s')", $node->nid, $node->webform['confirmation'], $node->webform['confirmation_format'], $node->webform['teaser'], $node->webform['submit_text'], $node->webform['submit_limit'], $node->webform['submit_interval'], $node->webform['additional_validate'], $node->webform['additional_submit']); // Insert the components into the database. Used with clone.module. if (isset($node->webform['components']) && !empty($node->webform['components'])) { @@ -1255,31 +1255,16 @@ $microweight += 0.001; } } - // Do not display the submit button if this is a preview or submission view. - if ((!$preview && $enabled)) { - // Additional hidden elements. - $form['details']['email_subject'] = array( - '#type' => 'hidden', - '#value' => $node->webform['email_subject'], - ); - $form['details']['email_from_name'] = array( - '#type' => 'hidden', - '#value' => $node->webform['email_from_name'], - ); - $form['details']['email_from_address'] = array( + + $form['details']['nid'] = array( + '#type' => 'value', + '#value' => $node->nid, + ); + if (isset($submission->sid)) { + $form['details']['sid'] = array( '#type' => 'hidden', - '#value' => $node->webform['email_from_address'], - ); - $form['details']['nid'] = array( - '#type' => 'value', - '#value' => $node->nid, + '#value' => $submission->sid, ); - if (isset($submission->sid)) { - $form['details']['sid'] = array( - '#type' => 'hidden', - '#value' => $submission->sid, - ); - } } } @@ -1634,7 +1619,7 @@ if (isset($vars['form']['details']['nid']['#value'])) { $vars['nid'] = $vars['form']['details']['nid']['#value']; } - else { + elseif (isset($vars['form']['submission']['#value'])) { $vars['nid'] = $vars['form']['submission']['#value']->nid; } } Index: tests/webform.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/tests/webform.test,v retrieving revision 1.2 diff -u -r1.2 webform.test --- tests/webform.test 7 May 2009 22:38:14 -0000 1.2 +++ tests/webform.test 17 Jun 2009 23:20:01 -0000 @@ -602,15 +602,11 @@ 'submit_text' => '', 'submit_limit' => '-1', 'submit_interval' => '-1', - 'email' => 'nate@localhost', - 'email_from_name' => 'default', - 'email_from_address' => 'default', - 'email_subject' => 'default', 'additional_validate' => '', 'additional_submit' => '', 'roles' => array('1', '2'), 'components' => array(), - 'additional_emails' => array(), + 'emails' => array(), ), ); Index: includes/webform.pages.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.pages.inc,v retrieving revision 1.3 diff -u -r1.3 webform.pages.inc --- includes/webform.pages.inc 17 Jun 2009 23:01:32 -0000 1.3 +++ includes/webform.pages.inc 17 Jun 2009 23:20:01 -0000 @@ -167,11 +167,6 @@ } } } - if ($form_state['values']['email_from_address_option'] == 'custom') { - if (!valid_email_address($form_state['values']['email_from_address_custom'])) { - form_set_error('email_from_address_custom', t('The entered email address %address is not a valid address.', array('%address' => $node->webform['email_from_address_custom']))); - } - } } /**