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?
1 Answer
- 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. Jul 11, 2017 at 7:29
-
-
how to get Attachment field i have tried but file name is get only Please Check screen-short prnt.sc/r2yo9s Please Help me Feb 16, 2020 at 5:42