Jump to:
| Project: | Webform |
| Version: | 6.x-2.1.2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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.
Comments
#1
Did you find any solution? I need the sid for my module, too.
#2