Magento Contact Form Not Working

Recently I had a problem with a Magento installation with my Magento contact form was working.

The symptoms were that the Magento Contact form was displayed correctly, but when submitted no email was sent.

The Issue was traced to the form action which had nothing in it.  In the code (file is template/contact/form.phtml) the form was called using:

<form action=”<?php echo $this->getFormAction(); ?>” id=”contactForm” method=”post”>

However, in the source code the code appeared as:

<form action=”” id=”contactForm” method=”post“>

i.e. nothing was being generated in the form action, no nothing happened when it was submitted.

To fix this problem I changed The form line to:

<form action=”<?php echo $this->getUrl(‘contacts/index/post’); ?>” id=”contactForm” method=”post”>

And now it works.

So in summary, if you’re having a problem with a Magento contact form not working it’s worth having a look at the source code and seeing if this fix will work.

Share This