Update Webform Submission from subsequent form on confirmation page I am trying to update a webform submission from a form on the confirmation page. My callback function is as follows, but it's not updating the submission. What is the correct syntax to accomplish this? I'm getting the webform node and the submission are loaded correctly but the webform_submission_update is not updating the record. What am I doing wrong?

$nid = 3389;
$webform = node_load(3389);
$sid = $form['sid']['#default_value'];
module_load_include('inc', 'webform', 'includes/webform.submissions');
$submission = webform_get_submissions($nid, $sid);
$email = check_plain($form['your-email']['#value']);
$submission-&gt;data[14]['value'][0] = $email;
webform_submission_update($webform, $submission);
Looks like you are you using the wrong function, rather then retrieving a single webform submission you are retrieving multiple entries.

$nid = 3389;
$webform = node_load(3389);
$sid = $form['sid']['#default_value'];
module_load_include('inc', 'webform', 'includes/webform.submissions');
$submission = webform_get_submission($nid, $sid); // note function name
$email = check_plain($form['your-email']['#value']);
$submission-&gt;data[14]['value'][0] = $email;
webform_submission_update($webform, $submission);