Magento – Add fields to default Contact Form

  1. Edit form.phtml that is located on “app/design/frontend/default/YOUR_THEME/template/contacts/form.phtml"
  2. Find the following line of code :
    <li>
    <label for=”telephone”><?php echo Mage::helper(‘contacts’)->__(‘Telephone’) ?></label>
    <div class=”input-box”>
    <input name=”telephone” id=”telephone” title=”<?php echo Mage::helper(‘contacts’)->__(‘Telephone’) ?>” value=”” class=”input-text” type=”text” />
    </div>
    </li>
  3. And add the new field
    <li>
    <label for=”subject”><?php echo Mage::helper(‘contacts’)->__(‘Subject’) ?> <span class=”required”>*</span></label>
    <div class=”input-box”><input name=”subject” id=”subject” title=”<?php echo Mage::helper(‘contacts’)->__(‘Subject’) ?>” value=”” class=”required-entry input-text” type=”text”/>
    </div>
    </li>
  4. Now go to Admin panel, under “Admin Panel => System => Transactional E-mails”, click “add new template”, and from the “template” drop-down, select “Contact Form” and “Load template”, Under Template content you eill see :
    Name: {{var data.name}}
    E-mail: {{var data.email}}
    Telephone: {{var data.telephone}}
    Comment: {{var data.comment}}
  5. Now you can add your new fields where you need.
  6. Then add your template name and click “save”
  7. Now go under “System- Configuration”, and select “Contacts”,  Under the ” e-mail options ” drop-down, select you template and save.