Skip to content

Instantly share code, notes, and snippets.

@tjmapes
tjmapes / form-status.liquid
Last active April 19, 2021 19:47
Shopify contact form validation snippet
{%- if form.posted_successfully? -%}
<p class="form-message form-message--success" tabindex="-1" data-form-status>
{{ success_message | default: 'contact.form.post_success' | t }}
</p>
{%- endif -%}
{% comment %} We need to add this so the errors are output in the right order {% endcomment %}
{% assign error_order = "author, email, body, password, form" | split: ", " %}
{%- if form.errors -%}