I’m trying to modify the registration form of my store, I already did it in another Shopify store and it worked without problems but this time it doesn’t.
When the customer tries to register it doesn’t give any errors but the customer is not created, if the customer then tries to log in with his credential instead of giving error because the user doesn’t exist it just reloads the page without doing anything.
Here’s the code of the registration form:
{% form 'create_customer' %}
{{ form.errors | default_errors }}
<section class="contact-form-contact row-contact"> <!-- SECTION -->
<div class="form-field-contact col-contact x-50" style="margin-top: 40px">
<input id="first-name" class="input-text-contact js-input" type="text" name="customer[first_name]" required>
<label class="label-contact" for="first-name">First Name*</label>
</div>
<div class="form-field-contact col-contact x-50" style="margin-top: 40px">
<input id="last-name" class="input-text-contact js-input" type="text" name="customer[last_name]" required>
<label class="label-contact" for="last-name">Last Name*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 0px">
<input id="phone" class="input-text-contact js-input" type="text" name="customer[note][Telefono]" required>
<label class="label-contact" for="phone">Phone*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 0px">
<input id="address" class="input-text-contact js-input" type="text" name="customer[note][Indirizzo]" required>
<label class="label-contact" for="address">Address*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-50" style="margin-top: 0px">
<input id="city" class="input-text-contact js-input" type="text" name="customer[note][Città]" required>
<label class="label-contact" for="city">City*</label>
</div>
<div class="form-field-contact col-contact x-50" style="margin-top: 0px">
<input id="cap" class="input-text-contact js-input" type="text" name="customer[note][CAP]" required>
<label class="label-contact" for="cap">Zip Code*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 0px">
<input id="email" class="input-text-contact js-input" type="email" name="customer[email]" required>
<label class="label-contact" for="email">Email*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 0px">
<input id="password" class="input-text-contact js-input" type="password" name="customer[password]" required>
<label class="label-contact" for="password">Password*</label>
</div>
</section>
<section class="contact-form-contact row-contact">
<button type="submit" class="btn btn-dark w-100" value="Create">
{{ 'customer.register.submit' | t }}
</button>
</section>
{% endform %}
And here’s the code of the log in form
{% form 'customer_login' %}
{{ form.errors | default_errors }}
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 30px;">
<input id="email" class="input-text-contact js-input" type="email" name="customer[email]" required>
<label class="label-contact" for="email">Email</label>
</div>
</section>
{% if form.password_needed %}
<section class="contact-form-contact row-contact">
<div class="form-field-contact col-contact x-100" style="margin-top: 30px;">
<input id="password" class="input-text-contact js-input" type="password" name="customer[password]" required>
<label class="label-contact" for="password">Password*</label>
</div>
</section>
{% endif %}
<div class="form-check">
{% if form.password_needed %}
<a href="#recover" class="RecoverPassword">{{ 'customer.login.forgot_password' | t }}</a>
{% endif %}
</div>
<button type="submit" class="btn btn-dark w-100" value="{{ 'customer.login.log_in' | t }}">
{{ 'customer.login.log_in' | t }}
</button>
{% endform %}