How to remove the fax field from the frontend customer account settings in Magento

By default, when logged in customers want to add or edit an address from their account settings they can type a fax in the respective field. The fax field is optional so they don't have to do it. If you want to remove the field from the add/edit address form in the frontend customer account settings, you can do it by modifying the code of a single file.

For information on how to hide the fax field from being displayed on the checkout page, read the article on removing the fax field from the checkout page in Magento.

When it comes to the customer account settings you have to modify the file edit.phtml. If your application is installed directly in the public_html folder on your Magento hosting account and you use the default base theme that comes prepackaged with Magento, then the path to the file will be public_html/app/design/frontend/base/default/template/customer/address/edit.phtml. In the file find and comment out the code (around line 63):

<div class="field">
<label for="fax"><?php echo $this->__('Fax') ?></label>
<div class="input-box">
<input type="text" name="fax" id="fax" title="<?php echo $this->__('Fax') ?>" 
value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" 
class="input-text <?php echo $this->helper('customer/address')
->getAttributeValidationClass('fax') ?>" />

You can comment out the code by putting an exclamation mark and two hyphens after the first bracket (e.g. <!--div) and two hyphens before the last one (e.g. /div-->). You can edit files from the Files section of the Pixie control panel. An alternative way to do it is to download the file with an FTP client (e.g. FileZilla), edit it with a text editor (e.g. Notepad, Wordpad) and upload it back overwriting the old file.

In case you want to remove other fields on the add/edit form of the customer account settings you may find useful the articles on:

You may also find useful the corresponding articles for removing these fields from the checkout page.

Was this answer helpful?

 Print this Article

Also Read