User A submit a newsletter form and come to thank you page. At the thank you page there is another general comment form.

Here is my question: How to detect both of them are belong to User A?

Reason: So that I can extract both information together from database.

  • What are you using to submit a newsletter ?
    – Yama
    Jan 27 '16 at 10:55
  • Both of them are webform. :) Jan 29 '16 at 2:11

Another less obvious solution if using the rules module already is https://www.drupal.org/project/rules_session_vars

Set the variable when the first form is submitted and check for it when the second is submitted. The use rules to do whatever is needed.

Your own prepopulate solution is perfectly fine however. This one just stops someone from hacking the url.


I find out a solution. Get URL and pass it to webform's hidden field. When User Submitted a form and redirect to thank you page, in the URL will show unquie sid. With this sid, I can know they the forms submit by same person.

I wonder is there any better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.