1

I have to change a field of my contact form. For example, there is a field "telephone" which I have to replace with "subject" field in the contact us page form. Will anyone please tell me how can I make these changes?

2
  • Open form.phtml file located at app/design/frontend/default/YOUR_THEME/template/contacts folder.
  • Then find the following lines 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>

**

and replace it with:

<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>
  • Now to show this field in contact us mail login to Admin Panel => System => Transactional Emails and click Add New Template and from the templates drop-down box select Contact Form. Then click on Load Template button.
  • Under template content, find:

Telephone: {{var data.telephone}}

and replace it with:

Subject: {{var data.subject}}

  • Now go to System => Configuration and select Contacts. Then under the Email Options, select your new template under the Email Template drop-down and click on Save Config button.
  • Thank you so much Mohit. Its Working. You have solved out my query. Thanks once again. – Manish Gaur Jul 11 '17 at 7:29
  • yeah sure.......... – Manish Gaur Jul 13 '17 at 11:04
  • how to get Attachment field i have tried but file name is get only Please Check screen-short prnt.sc/r2yo9s Please Help me – Mohit Patel Feb 16 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.