Web Science Tutorials

Learn how to place a contact form on a standard Magento CMS page and have it redirect to another standard CMS success page after the form has been submitted. Very handy for making Magento contact forms and custom successfully submitted form pages.

 

The piece of code that goes on a Magento CMS page to call up the contact form
{{block type="core/template" name="contactForm" form_action="/contact/index/post" template="contacts/form.phtml"}}


This code goes at the very bottom of the script file that is called form.phtml
getMessagesBlock()->getGroupedHtml()!="")
        {
            
        header('Location: http://www.YOUR-DOMAIN.com./WHATEVER/THE/PAGE/URL-IS');
            
        }
        ?>

Water coloured page divider

Magento CMS Menu