Skip to main content

Collect additional customer information

You can collect additional information from customers when they create an account through the customer register form.

Note

You can't create new fields in the Shopify admin to host information, so any additional information is saved as a customer note. The customer note isn't accessible through Liquid, but can be accessed through the Customer object of the GraphQL Admin API.

This information can be collected with any HTML input type, except for file. The input needs to have an attribute of name="customer[note][Information title]", where Information title is the title of the information you're collecting. You can have more than one input for collecting a note entry.

For example, the following would allow you to collect a customer's birthday and any allergies they might have:

{% form 'create_customer' %}
{{ form.errors | default_errors }}

<div className="first-name">
<label for="first-name">First name</label>
<input id="first-name" type="text" name="customer[first_name]" />
</div>

<div className="last-name">
<label for="last-name">Last name</label>
<input id="last-name" type="text" name="customer[last_name]" />
</div>

<div className="email">
<label for="email">Email</label>
<input id="email" type="email" name="customer[email]" />
</div>

<div className="password">
<label for="password">Password</label>
<input id="password" type="password" name="customer[password]" />
</div>

<div className="password">
<label for="password-confirmation">Password</label>
<input id="password-confirmation" type="password" name="customer[password]" />
</div>

<div className="birthday">
<label for="birthday">Birthday</label>
<input id="birthday" type="date" name="customer[note][Birthday]" />
</div>

<div className="allergies">
<label for="allergies">Allergies</label>
<input id="allergies" type="text" name="customer[note][Allergies]" />
</div>

<div className="submit">
<input type="submit" value="Create" />
</div>
{% endform %}

Was this page helpful?