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

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!

I think you can find it in settings

Where can I find it in Settings?

Hi @Shivani3 ,

Maybe this article can help you

https://shopify.dev/themes/customer-engagement/add-contact-form?utm_campaign=Guru+Ask&utm_medium=Forum&utm_source=social#optional-inputs

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

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

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.

Hello @Shivani3

Please follow the below steps :-

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

  2. Click on Edit code

  1. Open main-register.liquid file.

  1. Add below code on line no. 98
Phone Number

  1. Now Register page looking like this -

Thank you

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?

@Shivani3

{{ 'customer.register.phone_number' | t }}

@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?

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

Hey

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

Or copy past this code :

Numéro de téléphone

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

Hi,

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

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

Hi there, thanks for the response,

I tried the code you provided so that the phone number case appear, and it was a success, however, if someone created an account, even if they give their number, i can’t find it in the customer details, it’s like the case is showing for nothing

Can i please get a solution for this

To collect additional data during customer registration AND have it automatically fill the corresponding field on the customer detail page, you need to use an app.

If you go the route of editing register.liquid, you can only save data to the customer note fields :backhand_index_pointing_down:

(source: Shopify Docs)

That’s why we made the Customer Fields app. You can easily add a phone number field (and other Shopify fields) using the app’s Lite plan, and save it to the customer’s phone field.

Follow Shopify’s tutorial to save customer phone number (or other data) to the customer note.

Otherwise, you’ll have to use an app if you want the phone number to populate the phone field on the customer detail page.