Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
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.
If you need advance help! Hire me
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 }} ?
when I add metafield
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
Result
This has added to the form , but it doesnt identify the field .
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.
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 !
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025