FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Referrer link from each page to form
#1
My client would like a link on each page back to a form and capture the referring page. Can Form Tools work with a referrer from a link and capture that in the database?
Reply
#2
Sure, no problem! What you can do is add a hidden field to your form like this:

Code:
<input type="hidden" name="referer_url" value="<?php echo $_SERVER["HTTP_REFERER"]?>" />

That will store the URL of the page that it was redirected from. Then, add the new field to be stored in Form Tools.

One caveat: this will work on MOST servers but not all. Some servers don't populate that key in the $_SERVER variable. If the information isn't available there, we'll need to consider a more drastic approach...

- Ben
Reply
#3
(Jan 31st, 2010, 7:49 PM)Ben Wrote: Sure, no problem! What you can do is add a hidden field to your form like this:

Code:
<input type="hidden" name="referer_url" value="<?php echo $_SERVER["HTTP_REFERER"]?>" />

That will store the URL of the page that it was redirected from. Then, add the new field to be stored in Form Tools.

One caveat: this will work on MOST servers but not all. Some servers don't populate that key in the $_SERVER variable. If the information isn't available there, we'll need to consider a more drastic approach...

- Ben

Thanks, Ben. Now to set it all up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)