I'm sending a referral form out to my email database and I've got it set up so that their email addresses get passed through and appended to the form URL like this:

http://www.holbrooktravel.com/[email protected]

I've got a hidden field in the form that collects the 'emailid' value and stores it with the responses so they can be matched up with our database.

That's working well, but once someone submits their form they're sent to a thank you page (http://www.holbrooktravel.com/referral-form/thank-you) where they can click a button to go back to the form and refer someone else.

I can't figure out how to keep their 'emailid' value on the 2nd referral so those submissions can be matched up as well. If I'm on the right line of thinking then I need to somehow keep the URL parameters on both the thank you page and the link sending them back to the referral form.

Any suggestions would be very much appreciated!

  • You can try with cookies. When you assigning email to hidden field at same time store email in cookie also. After that you can retrieve email from cookie on any page.
    – Rupesh
    Commented Feb 6, 2016 at 2:39

1 Answer 1


If you're able, and willing, to review/rework the current implementation you have for your webform submissions and the related "Thank you" page, you should consider getting the Rules module involved, e.g. to have the Rules module react to Rules event "After submitting a webform".

By doing so, you could then also use the Rules URL Argument module, which you can use to make the value of the URL argument available as new variable to Rules. Here is a quote about it (from its project page):

... provides two rules conditions based on URL arguments:

  • check if a URL argument is present.
  • compare the value of an URL argument.

It also provides an action that makes the value of an URL argument available as new variable to Rules.

The newly provided Rules actions and conditions can be found under the "URL Argument" conditions and actions groups in the rule configuration interface.

For an example of how to use it, refer to Comment # 3 in issue # 1686360 which is about "Pass an amount to the url, ie; site/content/node-title?amount=10 or /node-title?=amount:10". Here is the relevant part of it:

  • add a "Check if URL argument exist" condition to your rule and set the "ARGUMENT" value to "amount".
  • add "Provide URL argument value" action to the rule and set "URL ARGUMENT NAME" value to "amount" and in the "Provided variables" section "ARGUMENT FROM URL - Variable name" to e.g. "amount_from_url".

You will now be able to use the amount value as a variable "amount-from-url" for other actions in this rule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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