FROM CACHE - fr_header
Cette communauté a fait place à une assistance de pair-à-pair. L’assistance Shopify ne sera plus proposée pour cette communauté. Nous vous encourageons à entrer en contact avec d’autres marchands et partenaires pour obtenir de l’aide et partager vos expériences ! Veuillez continuer à signaler tout ce qui va à l'encontre de notre Code de conduite ou tout contenu que vous souhaitez faire supprimer.

Shopify flow add a different tag if the client embeds from the footer or pop-up

Shopify flow add a different tag if the client embeds from the footer or pop-up

psweb
Shopify Partner
4 0 0

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 %}
PS-WEB
0 RÉPONSES 0