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 :
    <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” />
  3. And add the new field
    <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”/>
  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}}
    E-mail: {{var}}
    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.