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->data['value'] = $email; webform_submission_update($webform, $submission);