Hello,

I've read everything I could find about using $sid and I couldn't find solution for my case, so please help.
I would like to use $sid in "Confirmation message or redirect URL" and in "Additional Processing" fields.
I've read webform.module and I've found that $sid should be in array $form_state['values']['details']['sid'], but it is not there. When I prinr_r($form_state['values']['details']) from Additional Processing, I got this:

Array ( [email_subject] => Поръчка на книги
[email_from_name] => default
[email_from_address] => books@manager.bg
[nid] => 224 )

No sid ... why is this happening and how can I use sid?
Thank you in advance.

Comments

quicksketch’s picture

This is because the SID has not yet been assigned at the time additional processing scripts have been run (after all, you couldn't edit the submission if it had already been saved). At this point in the processing you cannot get the SID. If needing the SID, the only way to capture it is to write a custom module that adds an additional #submit handler to the form, then the SID will be available as long as it comes after the normal submission handler for Webform.

spas’s picture

Thank you for the answer and sorry for delay. Is your answer valid for both situations - Additional processing and Confirmation message?
Because it makes sense for "additional processing", but "confirmation message" is displayed after the form is submitted. I'm not familiar in deep with form processing, so I just want to clarify that we are talking about the same thing.

I've managed to resolve my situation by putting some general confirmation message which says - "check your mail" and I've used sid in mail template.

Merry Christmas and keep the good work!

jfox77’s picture

Try using $_GET['sid'] to get the sid in the confirmation message or redirect URL section.

I still haven't figured out how to get it in the Additional Processing section though. =(

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.