Customer account creations / custom fields / dawn template

Customer account creations / custom fields / dawn template

cloudisland
New Member
4 0 0

Im trying to add some custom fields to the customer account creation.

 

I would like to collect "company name" and "address" on account creation.

 

i tried to add the following to main-register.liquid

 

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

 

This added "company" to the registration form but with a translation missing error.

 

I also stumbled along a help file for collecting additional info https://shopify.dev/themes/customer-engagement/additional-customer-information 

 

iam unsure if i should replace all the code with the coding found in the help link and then adjust that?

 

Any help appreciated. 

Replies 6 (6)

gr_trading
Shopify Partner
2025 148 205

Hi @cloudisland ,

 

It's showing translation missing error because where you write {{customer.register.company}}. It means there should be the metafield or column name in customer object, seems shopify don't have this object.

 

Therefore it's giving error to resolve it, please add metafield in your customer object.

hari1_prasad_0-1665672755708.png

 

If you need advance help! Hire me

For any custom development WhatsApp or connect at Email ID: support@grtrading.in for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
cloudisland
New Member
4 0 0

Many thanks for your reply !

 

I have added customer metafield for "company" but still received the same error.

 

do i need to adjust {{ 'customer.register.company' | t }} ?

 

 

gr_trading
Shopify Partner
2025 148 205

when I add metafield 

hari1_prasad_0-1665673440606.png

 

Means metafield should be written like customer.metafields.register.company or possibly it's because you have use single quote  {{ 'customer.register.company' | t }}

 

plz try with

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

 

My metafield looks like

hari1_prasad_1-1665677733222.png

 

Result

hari1_prasad_2-1665677749406.png

For any custom development WhatsApp or connect at Email ID: support@grtrading.in for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
cloudisland
New Member
4 0 0

cloudisland_0-1665679106921.png

 

This has added to the form , but it doesnt identify the field .

gr_trading
Shopify Partner
2025 148 205

@cloudisland ,

 

You didn't mark it as solution! Seems your issue is not only translation missing error. Can you elaborate your problem or flow in detail.

For any custom development WhatsApp or connect at Email ID: support@grtrading.in for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
cloudisland
New Member
4 0 0

I spent hours trying to get it right but no joy my website only runs in one language and that default for me is english. im not entirely sure it means translation in the way i first thought.

 

for now i used a work around by skipping metafields and saving the info as a customer note

 

<div class="field">
<input type="text" id="CustomerFormcompany" name="customer[note][company]" placeholder="company">
<label for="CustomerFormcompany">company</label>
</div>

 

The only downside is i now have to apply the info from the customer note to the account manually but itll do for now !