For the complete documentation index, see llms.txt. This page is also available as Markdown.
Customer registration with custom attributes (legacy)
Legacy β works only on stores using classic customer accounts.
This example only works on stores using classic customer accounts.
It hooks the theme's own /account/register form. Under Shopify's newer customer accounts, signup is hosted by Shopify and managed separately from your theme β the theme's registration form is not part of the flow, so there is nowhere to inject a custom field. No amount of theme code changes that.
Kept here because stores on classic customer accounts still work exactly as described.
On new customer accounts, collect the attribute after signup instead. A customer is logged in by then, which is all a customer-owned raven needs β put the field on an account or preferences page and submit it normally. See Collect custom customer attributes, which needs no registration hook at all.
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)