Edit Thank you and Error message for Contact Us page In Magento
By default Magento provides Contact Us Page, you can access the Contact Us Page by using the url http://www.yoursite.com/contacts. It has by deafault 4 fields Name, Email, Telephone and Comment box where as Name, Email and Comments are the required and Telephone is not required fields. Since it is by default functionality of the Magento so all the message and fields are predefined. Some time we need to change Success and Error message of the magento Contact Us form, it is very easy and you can change it by using the steps given below:
Magento Contact Us Default Error Message
Step 1. Navigate to the app/code/core/Mage/Contacts/controllers and open IndexController.php file in the editor of your choice.
Mage::getSingleton('customer/session')->addSuccess(Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
In the above line the Success message is “Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.” You can replace this Success message with your new Success message.
Mage::getSingleton('customer/session')->addError(Mage::helper('contacts')->__('Unable to submit your request. Please, try again later'));
In the above line the Error message is “Unable to submit your request. Please, try again later” You can replace this Error message with your new Error message.
Step 4. Save and refresh the Magento cache.
Wants to read how to add custom fields in Contact Us form In Magento? Click Here.
You have done.
Thanks and enjoy the Magento Coding.