Assign value to Customer Metafield using Input Field

Assign value to Customer Metafield using Input Field

WECare_Worldwid
Visitor
1 0 0

Hi. We have some custom input fields on our store's Customer Registration form. We wanted to know whether it's possible to assign a value, that we grab from these custom inputs, into a metafield that we have defined for a Customer?

 

For example: Let's say there's an input field to capture a customer's favorite flavor for a drink. We want to assign whatever they type on this input to the 'Preferred Flavor' metafield defined for Customers. Then, once captured, we plan on displaying this value on the Account page. 

 

We're looking at ways to implement this manually without using an App. Any suggestions or alternative approaches are highly appreciated. Thank you!

Replies 2 (2)

Cedcommerce
Shopify Partner
718 77 116

Hi @WECare_Worldwid,


You must use an app for this functionality, either it is a 3rd party app or a custom app because you need the required permissions for updating customer data, which can only be done through an app.

 

Also, there is an alternate solution in which you can save the additional data in customer notes but you can't display the data on your website.

You can check the link below for more details:-

https://shopify.dev/themes/customer-engagement/additional-customer-information

Please accept our answer as a solution if you find this helpful. 

All the best,
CedCommerce

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here

gr_trading
Shopify Partner
2032 148 205

Hi@WECare_Worldwid ,

 

Saving any information into metafields attracts API call since Shopify doesn't allow any backend code.

 

So the crux is it's not possible to achieve without an external or custom app.

 

But you can achieve it via 

https://shopify.dev/themes/customer-engagement/additional-customer-information

 

Hope, it helps

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