All things Shopify and commerce
I have added a phone number field in user registration field but its not saving data anywhere. I need to show that data in user's profile in phone field.
Note: I have tried saving the phone number in note field but need to integrate into the profile phone field.
Here is my code:
<div class="field">
<label for="customerPhone">Phone Number</label>
<input
type="tel"
id="customerPhone"
name="customer[phone]"
spellcheck="false"
autocapitalize="off"
autocomplete="phone"
aria-required="true"
placeholder="Mobile Number"
{% if form.errors contains 'phone' %}
aria-invalid="true"
aria-describedby="RegisterForm-phone-error"
{% endif %}
{% if customer.phone %}
value="{{ customer.phone }}"
{% endif %}
required
>
<label for="RegisterForm-phone"> Mobile Number </label>
</div>
{%- if form.errors contains 'phone' -%}
<span id="RegisterForm-phone-error" class="form__message">
<svg aria-hidden="true" focusable="false">
<use href="#icon-error" />
</svg>
{{ form.errors.translated_fields.phone | capitalize }}
{{ form.errors.messages.phone }}.
</span>
{%- endif -%}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024