Solved

How can I allow customers to fill in metafield info during account creation?

Mati7777777
Tourist
7 1 1

Hello,

I created a metafield for customer objet, this is fine, I can edit it through the Shopify Admin portal.

Mati7777777_0-1668608426626.png

 

But I want to offer the possibility for a customer to fill in this information during account creation to retreive it in the customer information page in admin center.

 

I tried to edit the main-register.liquid file, with no luck

 

<div class="field">
<input
type="text"
name="customer[Siret]"
id="RegisterForm-Siret"
placeholder="{{ 'customer.metafields.custom.siret' | t }}"
>
<label for="RegisterForm-Siret">
{{ 'customer.metafields.custom.siret' | t }}
</label>
</div>

 

anyone can help ?

thanks

 

Mathias

Accepted Solution (1)

Andrei_Kuchuk
Shopify Partner
44 5 14

This is an accepted solution.

Hello @Mati7777777 

Unfortunately, we have strong limitations in Shopify's default registration form
Proof: https://heliumdev.com/blog/shopify-create-custom-registration-form

We can avoid these restrictions only with API calls or external apps usages:
Create customer by API (https://shopify.dev/api/admin-rest/2022-04/resources/customer#post-customers)
External app example (https://apps.shopify.com/advanced-registration)

Andrei Kuchuk, Lead Shopify developer at SpiralScout

Cooperation email: andrey.kuhcuk@spiralscout.com

View solution in original post

Replies 4 (4)

Andrei_Kuchuk
Shopify Partner
44 5 14

This is an accepted solution.

Hello @Mati7777777 

Unfortunately, we have strong limitations in Shopify's default registration form
Proof: https://heliumdev.com/blog/shopify-create-custom-registration-form

We can avoid these restrictions only with API calls or external apps usages:
Create customer by API (https://shopify.dev/api/admin-rest/2022-04/resources/customer#post-customers)
External app example (https://apps.shopify.com/advanced-registration)

Andrei Kuchuk, Lead Shopify developer at SpiralScout

Cooperation email: andrey.kuhcuk@spiralscout.com
Mati7777777
Tourist
7 1 1

Ok many thanks !

michael-helium
Shopify Expert
367 5 180

Hey @Andrei_Kuchuk and @Mati7777777

I just stumbled on this thread and saw Andrei linked to my blog post. Thanks! 😊

We built the Customer Fields app to solve this problem exactly. Every custom field you collect using Customer Fields will save to customer metafields in Shopify. The app automatically adds metafield definitions within Shopify for each custom field you add to your form. You'll probably want to pin those metafields as well.

 

You can also collect standard Shopify fields like company_name, default_address, or tax_exempt and the data will sync with the customer records in Shopify. Furthermore, you can install an "edit account" form within the customer account area so that logged-in customers can edit certain information (you can choose what to let customers edit).

Michael, COO @ Helium
- Customer Fields ✪✪✪✪✪ (357 reviews)
- Meteor Mega Menu ✪✪✪✪✪ (281 reviews)

KarimTarek
Shopify Partner
34 0 10

I'm a bit late here 😅 However I thought I'd mention that last year I built a niche app (FieldsRaven) for theme developers to make creating/updating metafields possible on any step of the customer journey.

 

Your use case is a good fit for the app, I assume that you're comfortable working with code, in that case it should be really simple. Here is the quick start guide.