Adding DOB and Extra Text Field on Customer Account

New Member
7 0 0

Hey everyone! 

We are setting up a store that sells baby clothing and would like to add the ability for our customer to add their baby's name and baby's DOB on the sign up.

Two problems:

1. I've added an open text field onto the existing sign up - but I can't change the name of the label. See screenshots. If anyone can advice how I can change this on Prestige theme that would be great.

error translation missingerror translation missing

Code in customers/register.liquid

<div class="Form__Item">
<input type="text" class="Form__Input" name="customer[baby_name]" aria-label="{{ 'customer.register.baby_name' | t }}" placeholder="{{ 'customer.register.baby_name' | t }}" autofocus>
<label class="Form__FloatingLabel">{{ 'customer.register.baby_name' | t }}</label>

2. I don't see any ability to add a date field. Is the only option to do this via open text?


Shopify Expert
144 25 86

Hi @EvieZipster!

It looks like your store's theme does not have a translation setting for "Baby name", so the easiest way to fix the translation error is to hardcode the field label and placeholder in your form markup. For example, instead of using {{ 'customer.register.baby_name' | t }}, you could just use Baby's name.

That being said, collecting additional data from customers when they register for an account is a little tricky without using an app. Without an app, the additional data you want to collect would need to be saved into the Customer Note section of the Shopify admin. To do this, you need to edit the name attribute for each custom field on the form to use customer[note][field name]. Shopify's dev docs include a tutorial with some more details on this approach, which can be found here:

Hopefully this helps!


P.S. - If you are looking for an easier way to add extra fields to your store's sign up form (no coding needed!), then I would suggest taking a look at our Customer Fields app: The app's form builder has lots of field types that you can use, including date fields using a date picker! Here's a demo store with some examples:

Kyle W | Helium Dev, LLC
Helium builds apps for Shopify that thousands of merchants depend on:
- Customer Fields
- Meteor Mega Menu