Having issues showing page information in contact form email!

austinbenrimon
Tourist
4 0 2

I have a few hidden attributes in my contact form to show information about the product on the page (This is being set up as an inquiry form basically).

 

I've added these four attributes to the form:

 <div class="hidey-form">
<label class='' for="ContactFormProduct">Product image</label>
<input class='' type="text" id="ContactFormProduct" name="contact[Product-img-url]" value="{{ product | img_url }}">
</div>

<div class="hidey-form">
<label class='' for="ContactFormProduct">Product description</label>
<input class='' type="text" id="ContactFormProduct" name="contact[Product-description]" value="{{ product.description }}">
</div>

<div class="hidey-form">
<label class='' for="ContactFormProduct">Product tags</label>
<input class='' type="text" id="ContactFormProduct" name="contact[Product-tags]" value="{{ product.tags }}">
</div>

<div class="hidey-form">
<label class='' for="ContactFormProduct">Product url</label>
<input class='' type="text" id="ContactFormProduct" name="contact[Product-url]" value="{{ product.url }}">
</div>

 

Product URL seems to work and returns the URL of the product page in the email we receive, but Product content (I've also tried product.description) is just blank in the email we receive. This is the important part as we need to know the product information they're inquiring about. Can anyone help me fix this? 

 

(Bonus points if you can tell me how to include the product image in the email. I've been able to receive the image file name, but not actually showing the image)

0 Likes