Customer registration with custom attributes

Iโ€™m using AlpineJS to manage the state of the fields on the registration form, AlpineJS is already included with FieldsRaven theme extension, make sure to remove it if you'd rather go VanillaJS or use SomethingElseJS. (How to remove AlpineJS)

Demo (screen recording)

Steps:

  1. Create raven (screen recording demo)

  2. Hack customer registration form to store customer attributes in localStorage if they exists (example code below)

  3. After customer registration is success and customer is logged-in check if localStorage key exists

  4. If custom attributes exists in localStorage send a raven with it to create a customer metafield and optionally sync fields with Klaviyo

  5. If the raven is successful delete the localStorage

Code

Last updated