Know which page the customer filled the contact form on

13 1 4

Hello There,

My shop is and I have a get a quote form at every product page because we don't sell physical products rather customized services and there are no fixed prices and the aim is to get customers to contact us and ask about the price.

The main issue is that when a customer fills out the contact us form on one of the pages, I get an email telling me what the message was, the email of the customer and the basic info, but it doesn't tell me which page they filled the form on which is vital for my business since they would be asking about a particular service and wanting to get a price but I don't know which service, I would really appreciate if someone can tell me what to add but check the website before because I have a whole different thing going on there, I don't have an add to cart nor buy now nor prices there, only a contact form.

Thanks in advance

4 1 0

This is an accepted solution.

So I'm just getting started on my own shop, but I believe that I have one method to accomplish this. On the product page where you've put the form, I think the product object information is available. You can, therefore, modify the form so as to include a (hidden, if you want) form field to pass on the product.title or other data about it ala {{ product.title }} or any other attribute. No guarantees, but may be worth looking into. 

Shopify Partner
242 58 140

This is an accepted solution.

Hey @Shams123 ,


It looks like @JohnAtFisharply is on the right track! You will need to edit your 'product-template.liquid' file and add some code. This will get the product/service to be included in your contact form emails. Here's a quick how-to:


Before you customize your theme:


  • Duplicate your theme to create a backup copy. This makes it easy to discard your changes and start again if you need to.


Edit your theme code


  1. From your Shopify admin, go to Online Store > Themes.
  2. Click Actions > Edit code.
  3. In the Sections directory, click product-template.liquid.
  4. Find the submit button code that looks like:
    <input type="submit" class="btn right" value="{{ 'contact.form.send' | t }}">
  5. Right above the submit button code, paste this code:
    {%- if product and product.title -%}
       <input type="hidden" id="contactFormProduct" name="contact[product]" value="{{ product.title }}">
    {%- endif -%}
  6. Click Save.


That's it! Do let me know if this solved your problem or if you need further help.


Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit

13 1 4

Thank you guys very much, it worked like a charm. However, just for anyone reading this in the future, if you have removed the add to cart and buy now buttons from your store, and added only a form for customers to contact you, you might have a different Products template, so you must change to that template not the product-template.liquid the gentlemen suggested.

Thank you guys once again

New Member
1 0 0

Brian, I would like to add size and color to the email, is there a way to add them?


Hi Shams,

I’m glad that you solved your problem. If you will look for a tool which gives you functionality of personalized contact form on every page in your store which is a simple ticket system (in ticket you will get information about the url where the message was sent), you can try Leave a Message. I am sure that the installation process will be easier!