Dawn Theme including item's information on the Contact Form

Hi,
I’m using the Shopify Dawn theme on my shop and I’ve placed a Contact Form on the product’s page, so the customer can ask us questions about the product that he’s viewing. We need to modify this form, so when the customer answers us, it includes some identification information (SKU, or link, or item’s title…) on the subject field, so when we receive the contact form’s email we can identify which product the customer’s is talking about.
Any ideas?
Thanks and best regards,

Frank

@CaliforniaMotor

Hello

So add this lines above your contact form input type=“email” on product page:

You also add other product objects like sku, id by using the shopify product objects

Regards

Twinkle

If helpful please like and accept as solution. DM for any queries.

2 Likes

Hi @Savior ,

thanks for your answer. Dou you mean to insert this code on product.json template?

1 Like

@CaliforniaMotor

NO!!! In product.json you can see they is a section ‘main-product.liquid’.

There where you have added the contact form {% form…%} you can add below this line. If you already have added the contact form.

Regards

Twinkle

If you still have issues or queries DM me.

1 Like

How to make contact fields required and not optional?

@boauae

We can’t alter Shopify error code but we can add custom JS for contact form validation.

Thanks a lot for your reply! Could you help me make name, phone number and message required along with email?

I have also noticed that shipping form at checkout fields are all optional and not mandatory.

@boauae

I will need your access to add the validation using Javascript. Do you have Shopify plus? because only Shopify plus can edit the checkout page.

If you want to send the access send your store URL at here with your requirement.