Can no longer add registration fields in Magento

I have used this tutorial before for adding registration fields to the Magento registration page.

It has always worked, but since I have upgraded to Magento it no longer does. The attributes I add no longer show up under the customers information tab in the backend like it did before and are not getting saved. The attributes install into the database fine though. I thought maybe the config.xml part had changed but I checked it against the core customer one and the attributes are sill shown the same way:


Something must have changed since the last 1.4.2 beta because it worked fine then. If someone has any ideas it would be greatly appreciated and I could finally get some sleep! Thanks in advance!

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

I have been struggling with this one quite some time untill I figured it out. Since 1.4.2, the attributes to show in the admin’s customer’s form have to be in table customer_form_attribute.
You can add them with an upgrade in your module’s setup, with this code:

$eavConfig = Mage::getSingleton('eav/config');
$attribute = $eavConfig->getAttribute('customer', 'your_attributes_code');
$attribute->setData('used_in_forms', array('adminhtml_customer'));

Hope that helps.

Solution 2

Very usefull hints above, thank you David!

To make the new attributes saveable in frontend (register and edit)
just expand the second parameter array of $attribute->setData like this:

$eavConfig = Mage::getSingleton('eav/config');
$attribute = $eavConfig->getAttribute('customer', 'flavour');
$attribute->setData('used_in_forms',   array('customer_account_edit',

After that you will find 3 new entries in the customer_form_attribute table instead of one.

If you want to test this before and after this change, just insert

Mage::log(‘attrib: ‘. (string)$attribute->getAttributeCode());

after line 371 in app/code/core/Mage/Customer/Model/Form.php and you will see all the used attributes in the mage system log. (valid for mage

Solution 3

try this one :

Solution 4

FYI everyone, they removed the ‘special code’ in community edition that shows all the custom attributes. I use enterprise and we were considering community edition due to the savings. This is one of the hurdles we will have to overcome.

Doesn’t answer the question, but explains probably why they removed it from the free edition. The code to display them is completely missing from the theme.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply