[Custom registration form with alternate template] Returns to original template on Error

Shopify Partner
3 0 5


I'm have a custom form ( extra fields) on an alternative register template, and it's working as expected.

The page is called through the url /account/register?view=alternate

The only issue is when there is a form.error, it's directly routed back to /account/register instead of the alternate view

Bringing the customer to the traditionnal register template.

I have checked many ways but I can't find any solution to this, what am I missing ? 


My alternate template code

<link rel="canonical" href="https://novdistyep.myshopify.com/account/register?view=alternate">

<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--one-half medium-up--push-one-quarter">
      <div class="form-vertical">
        {% form 'create_customer', id: "alternate" %}
          <h1 class="text-center">{{ 'customer.register.title' | t }}</h1>

          {%- if form.errors -%}
            <div class="form-message form-message--error">
              {% for field in form.errors %}
   					{% if form.errors.messages[field] contains "E-mail est invalide." %}
      					Please use the correct email format
   					{% endif %}
  			{% endfor %}
          {%- endif -%}
        <img src="{{ 'Logo.png' | file_img_url: '300x' }}"
                     style="max-width: {{ section.settings.logo_max_width }}px;">
          <label for="IdentifiantEp">Identifiant EP</label>
		  <input required class="required" type="text" id="IdentifiantEp" name="customer[note][IdentifiantEp]" placeholder="Identifiant fourni par votre service RH"  autofocus >

          <label for="FirstName">{{ 'customer.register.first_name' | t }}</label>
          <input type="text" name="customer[first_name]" id="FirstName" {% if form.first_name %}value="{{ form.first_name }}"{% endif %} autofocus>

          <label for="LastName">{{ 'customer.register.last_name' | t }}</label>
          <input type="text" name="customer[last_name]" id="LastName" {% if form.last_name %}value="{{ form.last_name }}"{% endif %}>

          <label for="Email">Adresse Email </label>
          <input type="email" name="customer[email]" id="Email" class="{% if form.errors contains 'email' %} input--error{% endif %}" {% if form.email contains '@ocp.ma' %} value="{{ form.email }}"{% endif %} autocorrect="off" autocapitalize="off">
          <label for="CreatePassword">{{ 'customer.register.password' | t }}</label>
          <input type="password" name="customer[password]" id="CreatePassword" class="{% if form.errors contains 'password' %} input--error{% endif %}">

		<p style="display:none;">
          		  <input type=”hidden” name=”customer[tags]” value=”alternate” />

          <p class="text-center">
            <input type="submit" value="{{ 'customer.register.submit' | t }}" class="btn">

        {% endform %}


New Member
5 0 0

Just wanted to chime in - this is a problem for me too - can anyone offer up a fix?