Hello,
Is is possible to make a small contact form in the product page that could collect inquiries from customers?
Example, I want to put a message box/form only as wide as the product infos, under the color option.
Check image for reference.
Site: bauhaus-manila-ph.myshopify.com
PW: BM2024
Thanks!
Hi @naissancestudio ,
Please go to Customize > Default product > Product information > Add block > Custom Liquid and add code:
{%- form 'contact', id: 'ContactForm', class: contact_form_class -%}
{%- if form.posted_successfully? -%}
##
{% render 'icon-success' %}
{{ 'templates.contact.form.post_success' | t }}
{%- elsif form.errors -%}
##
{% render 'icon-error' %}
{{ 'templates.contact.form.error_heading' | t }}
- {{ form.errors.translated_fields.email | capitalize }}
{{ form.errors.messages.email }}
{%- endif -%}
{%- if form.errors contains 'email' -%}
<small>
{{ 'accessibility.error' | t }}
{%- render 'icon-error' -%}
{{- form.errors.translated_fields.email | capitalize }}
{{ form.errors.messages.email -}}
</small>
{%- endif -%}
{%- endform -%}