I'm starting with magento and i'm trying to modify a template. Right now the registration form has a first and last name and I want it to have only the first name. I checked the code and I found something on a file "template/persistent/customer/form/register.phtml" which has all fields for the form, but for the first and last name it has this piece of code:
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
Is there any file where I should setup the field of the registration form?
Thanks in advance.
You need to navigate to template/customer/widget/name.phtml. If this doesn't exist in your theme, copy it from the default into the same folder structure.
You will find a <div class="field name-lastname">
with the label and input that you can comment out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With