4

I'm trying to add custom fields to default Contact Us form but they are not displaying at all. I have used this procedure: 1. Edit form.phtml (inside my theme) and I put this code after Telephone:

<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"/>

2.Create a custom transactional email template where I load Contact Form and then I insert Subject: {{var data.subject}}

3.Then in System > Configuration > General > Contacts I assign a Custom Contact Form template and Save.

Nothing happens, my contact form is still the same. Any hint? Thanks

EDIT: Procedure described in this question is correct, I was changing wrong package file in app, so check allways with path hint if you are changing correct file.

6
  • I'm assuming your field appears on the frontend? if you add {{var data}} to your email template what do you get?
    – rob3000
    Aug 5, 2015 at 7:27
  • On frontend appears only standard fields as: Name, Email, Telephone and Comment. Even if I add {{var data.subject}} nothing happens, Subject field is not shown
    – bn302
    Aug 5, 2015 at 7:37
  • 2
    make sure your editing correct file by path hint Aug 5, 2015 at 7:39
  • can you edit your question with the full path of the file and all the contents
    – rob3000
    Aug 5, 2015 at 7:46
  • Meenakshi Sundaram R thank you a lot, I edited wrong form.phtml, after this I'm going in to the corner... Now works all, without problems.
    – bn302
    Aug 5, 2015 at 7:49

1 Answer 1

2

Procedure described in this question is correct, I was changing wrong package file in app, so check allways with path hint if you are changing correct file. So suggestion made by Meenakshi Sundaram R is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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