Adding fields to customer registration form

Tourist
4 0 1

Hi - Looking for some advice please, Im wanting to add a Business Name and Phone No. field to my customer registration form. 

On reading this article it looked pretty straight forward:
https://help.shopify.com/themes/customization/forms/get-more-information-with-customer-registration-...
But its just not working for me.

I simply copied one of the original fields code and changed it to Business Name where relevant, but that didnt work?   ie:
Original code:

<div id="last_name" class="clearfix large_form">
      <label for="last_name" class="login">{{ 'customer.register.last_name' | t }}</label>
      <input type="text" value="" name="customer[last_name]" id="last_name" class="large" size="30" />
</div>

copy, pasted and updated to:

<div id="business_name" class="clearfix large_form">
      <label for=" business_name " class="login">{{ 'customer.register. business_name | t }}</label>
      <input type="text" value="" name="customer[business_name]" id=" business_name " class="large" size="30" />
    </div>

I am using the Testament theme.
Im a total novice, although can usually figure things out so if anyone can offer any suggestions or advice, it would be greatly appreciated.
Thanks
J

1 Like
Shopify Staff
Shopify Staff
524 1 72

Hey, Judith!

My name is Alex, I'm a guru here at Shopify!

Ah, gotcha!  The issue I'm seeing here is that it isn't possible to create a new area in the admin to hold the information you're collecting - that being the case, it'll need to be collected as a customer note. There's a little more info on this in our guide right over here!

I'd suggest starting with the example snippets of code, rather than copying the code that's already in your theme.  Once that's done, you can start customizing it as you like to get it looking like the other fields on your customer registration form - just make sure that you don't alter the instance of customer[note] that you see in the example, that has to remain there!  You can start with a code snippet something like this:

<label for="CustomerFormBusinessName">Business Name</label>
<input type="text" id="BusinessName" name="customer[note][Business Name]" placeholder="Business Name">

I've tried this one out in my own test store, and I can confirm this works!      

Hope that's helped!  Please feel free to let me know, and you can always give us a call or start a live chat at any time.  We're open 24/7 for your convenience and always happy to assist!

Cheers,

Alex | Shopify Guru

1 Like
Tourist
4 0 1

Thank you, thank you :)
That worked a treat.

Much appreciated

J

0 Likes
Tourist
5 0 1

Hello,

you can also try App Registration Form Builder.

With this app you can build your own registration form with unlimited form fields, like you wish.

All options you can set from App configuration, without coding skills.

App is free for first 7 days.

 

 

1.jpg

0 Likes

FYI, you can save a customer's Business name/Company name to your Shopify admin, as long as it's part of a shipping address. We make this possible with the Customer Fields app, not sure if it's possible through @Alex23's suggested method. The "Company" field shown in the GIF below saves to the "default_address.company" data column in Shopify admin.

 

Screen Recording 2019-12-23 at 03.03 PM.gif

 

You can use Customer Fields to add custom fields to your registration form-- no code needed to build your form or install it on your theme.

Michael | Business Development @ Helium
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
- User friendly apps with top-rated US-based support
Customer Fields App (since 2015)
Meteor Mega Menu App (since 2014)
0 Likes