I am editing the layout of my edit.phtml in template/customer/address/, i have edited the layout and labels of some fields there, no problem.

Except, i have 3 fields in the code which i can't edit because they are being called on the following way:

Begin of the code:
$this->getBlockHtml('formkey') in address magento
Later in the code:
<?php echo $this->getNameBlockHtml() ?>

I have no idea where to edit the layout/label names, etc. of this fields. All evening i tried to find out where to do, but searching other questions is leading me to .php files, but not, for example to the tag of the field.

How can i accomplish this?

1 Answer 1


$this->getBlockHtml('formkey') creates a hidden field which you should not remove. (It is a security feature to help protect against cross-site scripting attacks.)

<?php echo $this->getNameBlockHtml() ?> would logically take you to app\code\core\Mage\Customer\Block\Address\Edit.php which is probably the PHP file you mentioned. The important thing to note there is the getNameBlockHtml() method, which dynamically creates a new 'customer/widget_name' block. As the name of the block suggests, the template for that block can be found in app\design\frontend\base\default\template\customer\widget\name.phtml

  • Thank you Tyler, that did the trick. name.phtml did contain the code i needed.
    – John
    Mar 18, 2015 at 8:20

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.