So Im trying to implement a notify when available form on the product-form.liquid file but it keeps giving me an error if I remove “{% form ‘product’, product %}” and its corresponding {% endform %} it will work but will mess up the format of the the page and cause the buttons to be close to the text. Please let me know how I can fix this.
Here is the code:
{% form ‘product’, product %}
{% if product.available %}
{{ 'products.product.add_to_cart' | t }}
{% else %}
{{ 'products.product.sold_out' | t }}
{% endif %}
{% unless product.available %}
{% form ‘contact’ %}
{% if form.posted_successfully? %}
Thanks! We will notify you when this product becomes available!
{% else %}Notify me when this product is available
{% endform %}
{% endunless %}
{% if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
{% endform %}
Preview Link: https://w0llfhv7sf90rb04-4339695709.shopifypreview.com

