Liquid, Javascript, thèmes
I have 2 newsletters in different places. one in the pop-up and another in the footer.
using shopify flow I would like to add a different tag if the visitor fills in the request from the footer.
for example add the tag "newsletter-footer"
I thought I would add a hidden field to the form:
<input type="hidden" name="subscription_source_newsletter" value="footer">
but I don’t see how to retrieve the information in flow...
Have an idea? or another method?
thank you very much for your help
this is my code:
{% when 'newsletter' %} <div style="text-align: center;"> {% if block.settings.title != blank %} <h2 class="Footer__Title Heading u-h6">{{ block.settings.title | escape }}</h2> {% endif %} {% if block.settings.content != blank %} <div class="Footer__Content Rte"> {{ block.settings.content }} </div> {% endif %} {% form 'customer', id: 'footer-newsletter', class: 'Footer__Newsletter Form' %} <style> .newsletterCssCustom { display: inline-flex; gap: 1.5em; text-align-last: center; margin-bottom: 4em } .hrRowCustom { width: 95vw; } @media only screen and (max-width: 768px) { .newsletterCssCustom { display: flex; flex-direction: column; } .hrRowCustom { width: 90vw; } } </style> <input type="hidden" name="subscription_source_newsletter" value="footer"> <div class="newsletterCssCustom"> {% if form.posted_successfully? %} <p class="Form__Alert Alert Alert--success">{{ 'footer.newsletter.success' | t }}</p> {% else %} {% if form.errors %} <p class="Form__Alert Alert Alert--error">{{ form.errors.messages['email'] }}</p> {% endif %} <input type="hidden" name="contact[tags]" value="newsletter"> <input type="email" name="contact[email]" class="Form__Input" aria-label="{{ 'footer.newsletter.input' | t }}" placeholder="{{ 'footer.newsletter.input' | t }}" required style="width: auto "> <button type="submit" class="Form__Submit Button Button--primary">{{ 'footer.newsletter.submit' | t }}</button> {% endif %} </div> {% endform %} <hr class="hrRowCustom"> </div> {% endcase %} </div> {% endfor %} </div> {% endif %}
Bonjour, Depuis quelque temps, nous nous attachons à améliorer l’expérience Shopify e...
By Shopify May 12, 2025Maîtrisez l’expansion internationale de votre activité Shopify grâce au parcours d’appr...
By Shopify Feb 7, 2025Agrandissez la vente en gros avec le parcours d’apprentissage de Shopify Academy, B2B...
By Shopify Jan 30, 2025