skip to Main Content

I want to create a field for phone in shopify registration form. So that i have written the following code at register.liquid:

 <label for="phone" class="label--hidden">Phone Number</label>   
 <input type="text" value="" name="customer[phone]" id="phone" class="phone" placeholder="Phone"/>

But when i fetched all the customer data by shopify api , phone field is null for all the customers. I checked the documentation and didn’t find helpful anything about it. Thanks.

2

Answers


  1. Use the note field:

    <input type="text" name="customer[note][Phone]" placeholder="Phone"/>
    

    There’s no way to save it directly into the customer’s phone field using the registration form.

    Login or Signup to reply.
  2.  <label>{{ customer.phone }}</label>
     <input type="text" name="[Phone]" value="{{ customer.phone }}">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search