I've created 2 new customer attributes. These attributes show in the admin under "Customers > Attributes > Manage Customer Address Attributes".
I've overwritten the registration form (register.phtml) to display form fields matching these attributes. When I debug through the registration process, I see that Mage_Customer_Model_Form::getAttributes
does not include my new attributes.
Because of this (I think), my new attributes are not being saved in the database. What step am I missing to make the registration form save my new attributes?
Best Answer
Add the attribute to the form-filter
To save new attributes in an EAV table through a form, you need to set the
used_on_forms
setting, like this in a setup fileThere are a lot more forms, like
customer_account_edit
.Be careful, this example is from a customer attribute, not customer address!
A few form codes:
I'm not sure whether I got all, maybe there are some, which are not used but mentioned in the code.