AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: timlight10 on September 05, 2022, 02:48:51 PM

Title: How to get referrer from a form?
Post by: timlight10 on September 05, 2022, 02:48:51 PM
I have added a form with Admin > Design > Forms Manager for customers to request a custom quote on a product. It appears on all of my product pages. I would like to have the page URL where the form was submitted to come to me in the e-mail when user clicks submit.

I have tried to add a "hidden" field with Field Value $_SERVER['HTTP_REFERER'] but that did not work.

Any suggestions?
Title: Re: How to get referrer from a form?
Post by: abolabo on September 06, 2022, 01:48:35 AM
try to use session. Set some value (current product url into $this->session->data['product_url']) and set it into your hidden field in the form
Title: Re: How to get referrer from a form?
Post by: timlight10 on September 06, 2022, 10:09:52 AM
Nope, that doesn't work either. I just get the text "$this->session->data['product_url']" back.
Title: Re: How to get referrer from a form?
Post by: timlight10 on September 12, 2022, 08:41:08 AM
Any other suggestions?