How can customers add personal information to a metafield area?

Hello friends,

I want customer can add their information (such as gender, birthday, and allergies) to metafield area.

I want to use it like this:

I know Shopify doesn’t allow customers to add their metafield data themselves.

But every time there’s a way to solve it!

[Or, another way, please tell me how to use the customer’s notes(not the order note) on the account page.]

Hi there!

I am not sure if this would help, but you can modify the form field to include line item information on the product. Let me know if this would solve the issue and we can work together on the proper code from there!

Thanks for your opinion!

I need just a simple example of code about it, could you give me some example?

Your code isn’t far off! Here is the proper code to add line item properties to a product:


Here is an example of how this is rendered in Debut:

The only issues I see:

  1. The date needs to have some sort of formatting or validation to ensure that your data is all formatted correctly

  2. Using the order notes could be a good alternative as it would allow the customer to only enter it once, regardless of the product count.

  3. What are you going to do with this data? An ideal solution would allow this information to be ported over to an email marketing service, such as Klaviyo, so that you can run birthday promotions on an automated basis.

Did the code that I provided help create the line item properties? If so, please mark the post as a solution so that other shop owners can find this answer in the future :slightly_smiling_face:

Hi.

You can’t implement a metafield input with liquid code that we know, you’d need to use an app to add custom fields to the customer form that can save the data in customer metafields.

Actually the app in my signature has a plugin to do exactly this, Custom Forms, to build custom registration and profile forms with custom fields that save the information in customer metafields.