【问题标题】:Form Button is not working with unless condition - Shopify表单按钮无法使用,除非条件 - Shopify
【发布时间】:2021-12-24 07:36:33
【问题描述】:

一切都像我预期的那样显示,但发送按钮不起作用。 按钮也不能点击

这部分用于product-form.liquid

{% unless product.available %}

{%- form 'contact', id: form_id -%}
    {% if form.posted_successfully? %}
    <p class="accent-text">Thanks! We will notify you when this product becomes available!</p>
    {% else %}
    <p>Enter your email to get notified when {{ product.title }} become available.</p>
    {% endif %}
 
   
    <div id="notify-me-wrapper" class="clearfix">
      {% if customer %}
      <input type="hidden" name="contact[email]" value="{{ customer.email }}" />
      {% else %}
      <input style="float:left; width:180px;" required="required" type="email" name="contact[email]" placeholder="your@email.com" class="styled-input" />
      {% endif %}
      <input type="hidden" name="contact[body]" value="Please notify me when {{ product.title | escape }} becomes available." />
    </div>

<button type="submit" class="btn">
          {{ 'contact.form.send' | t }}
        </button>
  {% endform %}

{% endunless %} 

【问题讨论】:

    标签: shopify liquid


    【解决方案1】:

    我已在我的商店中检查了您的代码。液体代码没有错误。页面加载后可能会影响某些 js 代码。请检查您的 JS 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多