title: Adding field to Customer Address and showing it in the admin panel?
body: <p>I just created an attribute (lastname2) for customer addressess, however I'm not beeing able to show it in the edit address field of the admin panel.</p>
  
  <p>As you can see below I'm setting <code>used_in_forms</code> so that it contains <code>'adminhtml_customer_address'</code> and <code>'adminhtml_customer'</code>, but the field still refuses to appear.</p>
  
  <p>Any help will be deeply appreciated.</p>
  
  <p>This is my installer code:</p>
  
  <pre><code>&lt;?php
      // update customer address user defined attributes data
      $entityAttributes = array('customer_address'=&gt; array(
              'lastname2' =&gt;  array(
                  'store_label'=&gt;'Apellido Materno',
                  'label' =&gt; 'Apellido Materno',
                  'input' =&gt; 'text',
                  'type'  =&gt; 'varchar',
                  //System =  False and visible true = Show in 'customer_account_create', 'customer_account_edit', 'checkout_register'
                  'system'=&gt;true,
                  'visible'=&gt;true, //Watch out!! Only visible fields get processed by the form controllers!!!
                  'user_defined'=&gt;false,
                  'used_in_forms' =&gt; array('customer_account_create','customer_register_address','customer_address_edit','adminhtml_customer_address','adminhtml_customer'),
                  'required' =&gt; 0,
                  'position' =&gt;69
              ),
   );
  
  
  # Install Attributes
  foreach($entityAttributes as $entity=&gt;$attributes)
  {
      foreach($attributes as $attribute_code=&gt;$definition)
      {
          $installer-&gt;addAttribute($entity, $attribute_code,  $definition); 
  
          /**
          * @var Mage_Eav_Model_Config
          */
          Mage::getSingleton('eav/config')
          -&gt;getAttribute($entity, $attribute_code)
          -&gt;setData('used_in_forms',$definition['used_in_forms'])
          -&gt;save();
      }
  }
  </code></pre>