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.
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