Registration form success message

FKQengineering
New Member
2 0 2

Currently the Shopify customer registration form, when successfully completed, redirects the user to the home page of the shopify website. This is unless there is an error in which case you are redirected to the registration form page and an error message displays. The final caveat is that if you have submitted the form already, there is a middle step of a google ReCAPTCHA challenge.

The problem we are experiencing is that no message displays alerting you you have successfully created an account.

 

We have been able to redirect the form back to the registration page on successful challenge using this code in the head block of our theme.liquid file:

 

<script>
    $(document).ready(function(){
      var whereToRedirectAfterRegistering = '/account/register'; // Change this to tell Shopify where you want to redirect after registering.

      var registerForm = $('.shopify-challenge__button').parent(); // Register form, or captcha form for registering

      var formElement = $('<input type="hidden" name="return_to">'); // Make our element
      formElement.attr('value', whereToRedirectAfterRegistering); // Shopify will use this value as the redirect destination

      // formElement looks like <input type="hidden" name="return_to" value="/checkout" />
      registerForm.append(formElement); // Add the element to the form.
});
  </script>

 

however the code that traditionally displays on success:

 

{%- if form.posted_successfully? -%}
<p>Thank you for registering an account.</p>
{%- endif -%}

 

...does not work.

 

Please Help!

lauragg
New Member
2 0 0

Hi !
Did you find a solution ? I face the same issue !

 

Thanks in advance

0 Likes
Richie2506
New Member
2 0 0

form.posted-succesfully also did not work for me, but instead

 

 

{% if form.errors %}

 

worked.

 

Try do something like

 

 

{% if form.errors %}

<h4>Register</h4>

<p>Errors</p>

{% else %}

<h4>Register</h4>

{% endif %}

Hope this helps.

0 Likes
danielagsb
Explorer
69 0 13

I have tried all of the suggestions in the page without luck - I set my website as members-only and only customers that have been tagged as "approved" can login, meaning that when the user submits a form he is redirected to the login page  (I don't know if this is affecting it) - can anyone help please? 

 <div class="customer__account-form text-center">
     <div class="form-vertical">
      {% form 'create_customer' %}
        <h1 class="h2">{{ 'customer.register.title' | t }}</h1>
        {% if form.posted_successfully? %}
	      <h6> Thank you message <h6>
        {% else %}
              {{ form.errors | default_errors }}
        {% endif %}

Thank you!

0 Likes
elisetello
New Member
1 0 0

Did anyone figure out a solution for this? 

0 Likes
danielagsb
Explorer
69 0 13

@elisetello still no - you? 

0 Likes
ErSanjay
Trailblazer
146 18 23

this is not working for me

0 Likes