I'd like to create a landing page for all of my webforms. I need this page to be able to load the submission that was just made. When using the internal: style redirect, the sid is passed, but webform_get_submission() wants both the sid nid. Is it possible to load a submission from the sid only, or is there a nice way to pass the NID to the confirmation page?
Thanks,
-visum
Comments
Comment #1
visum commentedFrom looking at the webform_submission table, it would appear that sid is never duplicated, even across different forms. This makes it seem unnecessary to require the nid when getting a submission. Is there a reason I shouldn't infer the nid from the given sid and use it to get at submission data?
Comment #2
quicksketchThat approach should work fine. Just make sure that you add a check to ensure that the current user looking at the page was the same person that made the submission. I'd probably just query the database and find the user's last submission, or use webform_get_submissions().
However whichever path you take, support for writing custom code is not provided in the Webform issue queue, so you'll be on your own writing the page.