Re-direct after account creation DAWN

Re-direct after account creation DAWN

Greer_George
Tourist
12 0 2

Hi Guys.

 

I'm wanting to re-direct to a specific page after account creation.

 

I've used the below code at the bottom of the theme.liquid template but unfortunately it re-directs without finalising the creation of the account. Could anyone assist me please?

 

    <script>
  (function() {
    var REDIRECT_PATH = '/pages/registration-form';
 
    var selector = '#create_customer, form[action$="/account"][method="post"]',
        $form = document.querySelectorAll(selector)[0];
 
    if ($form) {
      $redirect = document.createElement('input');
      $redirect.setAttribute('name', 'return_to');
      $redirect.setAttribute('type', 'hidden');
      $redirect.value = REDIRECT_PATH;
      $form.appendChild($redirect);
    }
  })();
</script>
Reply 1 (1)

PaulNewton
Shopify Partner
7721 678 1626