How to change customer metafield data depend on the value of checkbox when customer registers?

Hello,

I need to add some extra info about a customer. So my plan is to use the metafields of a customer object to store these extra values. I’m able to add new metafields.

However, I can’t find the way how I make this metafields data changed depends on the value of certain checkbox in register page. What I want to do is When customer checks “Are you a corporate customer?” checkbox and submit, I want to make “B2B” customer metafields data’s value become “True” automatically. Is there a way to do this?

Hey @dico1631 !

At the moment Shopify does not allow metafield values to be changed outside of the Admin APIs. You can use Liquid and/or the Storefront API to get metafield values, but creating/updating metafield values requires the use of an Admin API. If you’re not in the position to build a custom app to achieve your goal, then I would suggest trying out our Customer Fields app.

All of the custom data collected by our app’s forms is automatically saved into Shopify’s customer metafields, so you can easily create a registration form with custom fields like “birthday”, “allergies”, “corporate customer”, etc., and get all of these values to save into customer metafields in Shopify. The app supports a variety of different field types which correlate to their respective metafield types in Shopify. In addition to saving custom data upon registration, you can also use the app to give customers the option to edit their data using an embedded form.

Feel free to browse our Help Center for more details: https://help.customerfields.com/

Hopefully this helps!