How to add phone number in customer register page?- Envy theme

Ardra
Tourist
13 0 4

Hi,

I would like to add a phone number to the customer registration page. I added a similar code for the phone number in the customer/register liquid but it didn't work

<div id="phone_number" class="clearfix large_form">
<label for="phone_number" class="login">{{ 'customer.register.phone_number' | t }}</label>
<input type="phone_number" class="form-control" name="customer[phone_number]" id="phone_number" class="large" size="30" />
</div>

Ardra_0-1634851058437.png

Ardra_1-1634851319772.png

Can someone help me to figure out the solution?

 

Replies 6 (6)

KetanKumar
Shopify Partner
36855 3637 11980

@Ardra 

yes please add just text

 

<div id="phone_number" class="clearfix large_form">
<label for="phone_number" class="login">Phone Number</label>
<input type="phone_number" class="form-control" name="customer[phone_number]" id="phone_number" class="large" size="30" />
</div>

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
motiulbd1992
Shopify Partner
1 0 0

how can i add the country code before phone number?  

Digital_Imran
Shopify Partner
154 2 19

It worked. Thank you 🙂

Problem Solved? ✔Accept and Like solutions to help future merchants.

Do you need high converting Shopify store? with customized graphical banners, hire me.
Message me now to get started. My response time is lightning fast.

_realityengine
Shopify Partner
22 0 5

The "accepted solution" doesn't actually work. I have tried to solve this problem for hours, it is impossible to set the customer's phone number from a customer registration form. Short of installing a paid monthly app, this cannot be done with liquid, and none of the search results worked. I would love to be proven wrong.

// realityengine.design

RobMW
Tourist
10 0 3

Dear Ardra,

 

don't know why you marked the problem as solved. Because the answer marked as "Accepted Solution" doesn't do much more than your code. Just that it doesn't say "translation missing etc etc etc".

 

What code did you use in the end to solve the problem AND save the customer phone number in the right place in the customer account? Because neither of the two pieces of code in this thread save the phone number.

fabiomaticus
Tourist
5 0 12

I also failed to add the phone field. That is, the field I succeeded, but the number is not stored.