hello
I've searched here butto no avail.
I want to add a field to the form to show where they came from. We have visitors from different locations like referrers websites or adwords, and we wantto have a hidden field on the form to chw us where the person came from before they filled the form out. IS this possible?
Thanks
ian
I want to add a field to the form to show where they came from
Re: I want to add a field to the form to show where they came from
Yes, the referrer's url is available to PHP in $HTTP_REFERER, so get it into a variable like this:
and then in your form use $referer as the value of your hidden field.
Code: Select all
$referer=@$HTTP_REFERER;
Re: I want to add a field to the form to show where they came from
i added
$referer=@$HTTP_REFERER;
as the value for the hidden field, and it still does not pass the referrer info on. What am i missing?
ian
$referer=@$HTTP_REFERER;
as the value for the hidden field, and it still does not pass the referrer info on. What am i missing?
ian
Re: I want to add a field to the form to show where they came from
Make sure "Process smarty tags within field?:" is ticked for hidden field.
Value should be
Value should be
{$smarty.server.HTTP_REFERER}