$sid value needed after insertion of data completed on webfrom

tejaspmehta - July 22, 2009 - 10:32
Project:Webform
Version:6.x-2.1.2
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed
Description

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

<?php
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.

#1

haggins - September 28, 2009 - 19:16

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

#2

tejaspmehta - November 7, 2009 - 10:36
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.