In my registration form I need to add the Country field. I would like to use the built-in countries dropdown of Magento. Via backend it is not possible to add it. How should I add it?

1 Answer 1


You can search in this site or google how to add customer attribute. The specific for you case is that your attribute should be with:

'type'   => 'varchar',
'input'  => 'select',
'source' => 'customer/entity_address_attribute_source_country',
  • that source returns only the allowed countries, I would like to have the entire collection of countries. Which source should I use?
    – giani.sim
    Commented Jan 13, 2015 at 10:57
  • Please try with catalog/product_attribute_source_countryofmanufacture or make your own copy of Mage_Customer_Model_Entity_Address_Attribute_Source_Country and in public function getAllOptions() remove ->loadByStore($this->getAttribute()->getStoreId()) or replace it with loadData().
    – michael
    Commented Jan 13, 2015 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.