Product Id Embedded Into A Contact Form

Hi Guys,
Is there away to have the product id embedded in to a contact form? e.g I have a contact us button on all of our product pages and if a customer clicks the contact button on lets say the product ID 1 page,
the product ID 1 details are inserted into the contact form, if a customer clicks the contact button on the product ID 2 page, the product ID 2 details are inserted into the contact form etc.
I have tried using sessionStorage which almost works as below, but when submitting the form the details are not sent.


{$product.product nofilter}
{$smarty.capture.$sku nofilter}



pasted into the form builder of the page, using the type 'header' (only place that a script would work)

Item Description

Any thoughts would be helpful. Cheers

You can use referrer field on the form builder to track products

Thanks, eComLabs.

But I have tried the referrer field and have not got it to do what I need it to do, am I doing it wrong? (I tried it before trying the code/s above)

New field - Name - Referrer and nothing shows on form or email once submitted. What am I missing, please point out the obverse.


Contact support team with this issue. It should work out of the box

Ok, I changed back to the default form_builder template (I was using a custom one on our theme) and it does work, but not as expected.

Using the referer field, if you click contact us on product 1 and send form, product 1 is submitted and details are in the email. However if you then go to another product (lets say product 2) and click contact us and send the form, product 1 details are in the email, same as if you go to product 3, product 1 is in the email and so on. it seems to only remember the first product that was clicked on and not the actual product clicked from. Hope that makes sense. Is there away to fix this?

Looks like this field stores address of the webpage which is linked to the resource being requested. So hire someone to create a new hidden field for you which will store current product ID