取消
显示结果 
搜索替代 
您的意思是: 

如何用Shopify Liquid Form表单实现邮件订阅?

{% assign formId = 'ContactFooter' %}
{% form 'customer', id: formId, class: 'form-inline form-subscribe' %}

<input type="hidden" name="contact[tags]" value="newsletter">

<input type="email"
name="contact[email]"
id="{{ formId }}-email"
class="form-control {% if form.errors %} input--error{% endif %}"
value="{{ form.email }}"
placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
aria-required="true"
required
autocapitalize="off"
{% if form.errors %}
aria-invalid="true"
aria-describedby="{{ formId }}-email-error"
data-form-status
{% endif %}>

<button id="email-submit" type="submit" title="Subscibe" class="btn-custom"><i class="demo-ion icon-paper-plane-empty"></i></button>
{% if form.posted_successfully? %}
<p class="form-message form-message--success" tabindex="-1" data-form-status>
{{ 'general.newsletter_form.confirmation' | t }}
</p>
{% endif %}
{% if form.errors contains 'email' %}
<span id="{{ formId }}-email-error" class="input-error-message">
<span class="visually-hidden">{{ 'general.accessibility.error' | t }} </span>
<svg class="icon"><use xlink:href="#icon-error" /></svg>
<span class="site-footer__newsletter-error">{{ form.errors.translated_fields['email'] | capitalize }} {{ form.errors.messages['email'] }}.</span>
</span>
{% endif %}

{% endform %}

 

用户点击邮件订阅后,用户邮箱会在用户列表里

20210729181521.png

专注基于Shopify外贸营销推广,提供Shopify建站,谷歌广告,Facebook广告服务。
0 个赞
from7
探路者
110 4 13

experts比较吸引人

0 个赞