Hello,

I would like to receive $sid after user on my website complete filling 2-3 pages form and data are inserted into webform_submitted_data table.

What i figured out from basic core module of webform is we have webform_submissions.inc file. In this file we have webform_submission_insert function which mainly deal with insertion of entry into database. After that it returns $sid value. Now after reading some issue queue i did find that it is possible to get value with _form_alter() method.

For this i made one module with name gluewebform and my code is like

function gluewebform_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'webform_node_form') {
    $form['#submit'][] = 'gluewebform_getsid';
  }
  return $form;
}

function gluewebform_getsid(&$form, &$form_state) {
  $sid = $form_state['values']['sid'];

//	print $sid;die;
}

but it is not working. Now what i wants to know is
-> Is it possible to get value of $sid after submission of webform ?
-> If it is possible than how do i get $sid value with help of form_alter() mehtod.
-> If form_alter() method wont help me than anyother solution is possible ?

Please reply on this as it is very important to develope my new module.

Thank you.

Comments

haggins’s picture

Did you find any solution? I need the sid for my module, too.

tejaspmehta’s picture

Status: Active » Closed (fixed)