Solved

I want to add phone number option to customer register form for dawn theme.

Shivani3
Excursionist
43 0 8

I want to add phone number option to the customer registration form for my dawn theme. Please someone help me out with it?

Thank you!

Accepted Solution (1)

MandasaTech
Shopify Expert
723 146 152

This is an accepted solution.

Hello @Shivani3 

 

Please follow the below steps :-


1) Open you admin panel and click on Online Store.

2) Click on Edit code

MandasaTech_0-1669804913047.png

3) Open main-register.liquid file.

MandasaTech_1-1669805002783.png

4) Add below code on line no. 98

<div class="field">
<input
type="text"
name="customer[Number]"
id="RegisterForm-Number"
{% if form.last_name %}value="{{ form.last_name }}"{% endif %}
autocomplete="family-name"
placeholder="Phone Number"
>
<label for="RegisterForm-Number">
Phone Number
</label>
</div>

MandasaTech_2-1669805302255.png


5) Now Register page looking like this -

MandasaTech_3-1669805397032.png


Thank you

 

 

 

☞ Helpful or Question answered? Please Click Like & Mark it Accepted Solution
☞ Want to modify or custom changes on store for affordable price? Click on Contact button here
☞ Email at info@mandasa.in
☞ Whatsapp at +918989609120 | Hire us at: Website Support Page

View solution in original post

Replies 14 (14)

downtownvolley
New Member
5 0 0

I think you can find it in settings

Shivani3
Excursionist
43 0 8

Where can I find it in Settings?

Dan-From-Ryviu
Shopify Partner
7011 1325 1351

Hi @Shivani3,

Maybe this article can help you

https://shopify.dev/themes/customer-engagement/add-contact-form?utm_campaign=Guru+Ask&utm_medium=For...

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Shivani3
Excursionist
43 0 8

Thank you for your help but I want to add it in registration form which can be seen while creating account.

Dan-From-Ryviu
Shopify Partner
7011 1325 1351

yes, you can create another option using that instruction in your Online store > Themes > Edit code > Template > customer/register.liquid

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Shivani3
Excursionist
43 0 8

I tried it in the way you said but can't see the phone number text over there. It shows something different code over there on the form.

MandasaTech
Shopify Expert
723 146 152

This is an accepted solution.

Hello @Shivani3 

 

Please follow the below steps :-


1) Open you admin panel and click on Online Store.

2) Click on Edit code

MandasaTech_0-1669804913047.png

3) Open main-register.liquid file.

MandasaTech_1-1669805002783.png

4) Add below code on line no. 98

<div class="field">
<input
type="text"
name="customer[Number]"
id="RegisterForm-Number"
{% if form.last_name %}value="{{ form.last_name }}"{% endif %}
autocomplete="family-name"
placeholder="Phone Number"
>
<label for="RegisterForm-Number">
Phone Number
</label>
</div>

MandasaTech_2-1669805302255.png


5) Now Register page looking like this -

MandasaTech_3-1669805397032.png


Thank you

 

 

 

☞ Helpful or Question answered? Please Click Like & Mark it Accepted Solution
☞ Want to modify or custom changes on store for affordable price? Click on Contact button here
☞ Email at info@mandasa.in
☞ Whatsapp at +918989609120 | Hire us at: Website Support Page
Shivani3
Excursionist
43 0 8

I am able to add phone number option but the number is not shown in customer section of Shopify. Can you please help me out with this?

MandasaTech
Shopify Expert
723 146 152

@Shivani3 

<div class="field">
<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>

☞ Helpful or Question answered? Please Click Like & Mark it Accepted Solution
☞ Want to modify or custom changes on store for affordable price? Click on Contact button here
☞ Email at info@mandasa.in
☞ Whatsapp at +918989609120 | Hire us at: Website Support Page
Shivani3
Excursionist
43 0 8

@MandasaTech  I have added the code in main-register.liquid section and I am able to see the phone number option but when customer creates an account, the data of phone number is not reflected in customer section. Please  help me out with this? 

grayfashion
Visitor
1 0 0

same issue. How do I return it back to normal?

 

Tomtom19
Shopify Partner
4 0 0

Hey

 

You can add [note] in {    name="customer[note][Number]"   }

 

Or copy past this code : 

 

<div class="field">
<input
type="text"
name="customer[note][Number]"
id="RegisterForm-Number"
{% if form.last_name %}value="{{ form.last_name }}"{% endif %}
autocomplete="family-name"
placeholder="Phone Number"
>
<label for="RegisterForm-Number">
Numéro de téléphone
</label>
</div>

 

 

Like this, you can have the phone number in the note section in the customer backoffice

jckidss
Visitor
1 0 0

I try the code but phone number still not shown in the customer backoffice

powsav
Visitor
1 0 0

Hi,

Can i remove email field from the form and use only mobile number?