Have your say in Community Polls: What was/is your greatest motivation to start your own business?

trying to add addition form fields to my registration form

Solved

trying to add addition form fields to my registration form

psco
New Member
11 0 0

in the form field I believe I have located a complete entry to add field. 

Original copy: from Dawn template:

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

 

My Changes to this:

<div class="field">
<input
type="text"
name="customer[Business_name]"
id="RegisterForm-BusinessName"
{% if form.Customer_name %}value="{{ form.Customer_name }}"{% endif %}
autocomplete="Business-name"
placeholder="{{ 'customer.register.Business_name' | t }}"
>
<label for="RegisterForm-BusinessName">
{{ 'customer.register.Business_name' | t }}
</label>
</div

I am include the return snippet so you can see how it came out.

Screenshot 2022-07-28 122430.jpg

Please show me what I am doing incorrect so I can add this and I want to add a subscribe and unsubscribe check box so they have to choose one or the other for emails or sms.

 

Thank you

Ron

Accepted Solution (1)

Tina86
Shopify Partner
4 1 1

This is an accepted solution.

Hi Psco,

You need to add an entry for Business_name in your default locale file .

File can found under Theme > Locales > en.default.json .

In this file try searching for "register" , it might look like  this:

"register": {
"title": "Create account",
"first_name": "First name",
"last_name": "Last name",
"email": "Email",
"password": "Password",
"submit": "Create"
}

Here we'll need to add an entry for "Business_name" and it's text string.

Same for all other new fields like checkboxes etc.

View solution in original post

Replies 5 (5)

Tina86
Shopify Partner
4 1 1

This is an accepted solution.

Hi Psco,

You need to add an entry for Business_name in your default locale file .

File can found under Theme > Locales > en.default.json .

In this file try searching for "register" , it might look like  this:

"register": {
"title": "Create account",
"first_name": "First name",
"last_name": "Last name",
"email": "Email",
"password": "Password",
"submit": "Create"
}

Here we'll need to add an entry for "Business_name" and it's text string.

Same for all other new fields like checkboxes etc.

OliviaAnn1
Visitor
1 0 0

Hi,

 

I have followed the steps here and successfully added additional fields to the customer registration form. However, when a customer registers, the additional information does not show on their customer account. Where can I see the additional fields they filled out on their account?

user34534
Visitor
1 0 0

Hi,

I would think that is because you just added the field in the frontend and don't do anything with it in the backend, where the data is processed and stored. Have you figured out a simple way to do that?

michael-helium
Shopify Partner
378 5 185

@OliviaAnn1 - The only way to add new fields to the customer registration form that sync to the Shopify Admin > Customers page is via the Shopify Admin API. Said another way, an app is required. Either a custom app or a ready-made third-party app.

 

We built the Customer Fields app to help bridge this gap. 

Otherwise, you'll need to follow Shopify's tutorial on saving custom fields to the customer note section.

Michael, COO @ Helium
- Customer Fields ✪✪✪✪✪ (357 reviews)
- Meteor Mega Menu ✪✪✪✪✪ (281 reviews)
- Strike Automatic Discounts NEW!

thiwanka92
Visitor
1 0 0

If I want to add new field ,can you tell me which page I need to edit . en.default.json file ?  but chatgpt said add new field to the customers/register.liquid page , but I couldn't find that page. Help me