I would like to add alphabet validation for first and last name field in onepage checkout billing section.

But unable to find the template being loaded for this section. Other fields are being loaded from


How to find the template for first and last name fields?

1 Answer 1


In my magento instalation the template for first name and last name, in checkout, is template/customer/widget/name.phtml

It is added in template/persistent/checkout/onepage/billing.phtml as

`<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>`


<li id="billing-new-address-form"...>

But try to activate template path hints and you will see which template is responsible to rendering this fields.


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.