form.posted_successfully? remove after refresh

form.posted_successfully? remove after refresh

BeautyAesthetic
Visitor
1 0 0

Hi 

I'd like to remove the content I have in the "if form.posted_succesfully?" statement after I refresh the page. How can I achieve that?

 

{% form 'customer' %}
                  <div class="input-wrapper">
                    <input type="email" class="newsletter-text-input w-input" maxlength="256" name="contact[email]" data-name="contact[email]" placeholder="{{ 'ta11fdfc' | t }}" id="Newsletter-Input" required="" autocomplete='email'>
                    <input type="submit" value="" data-wait="" class="button-secondary inline w-button">
                  </div>
              {% if form.posted_successfully? %}
                  <div class="newsletter__container-success"><img src="{{ 'vectors-wrapper_5.svg' | asset_url }}" loading="lazy" width="20" height="20" alt="" class="icon-small">
                    <div class="is-p-small">{{ 't5a0ea5a1' | t }}</div>
                  </div>
            {% endif %}
{% endform %}

sorry liquid formating sucks...

 

---

 

additionally I'd like to replace the signup content with the success message when i post successfully (and then reset when I refresh). How can I do this? 

---

I was thinking about jquery but never worked with liquid and jquery.

Replies 0 (0)