Home > e-commerce, magento, technical notes > Magento Notes — Fix for adding contact form in CMS pages

Magento Notes — Fix for adding contact form in CMS pages

March 16th, 2009

This is a follow-up post on a fix that I had suggested about adding a contact us form through the CMS admin tool here.  What I found out was that the form post back left out the action parameter…when you do a view source.  So essentially the form gets filled out but doesn’t get sent to the site owner.

I found this out on my own tickon.com web site’s submit a product page.  Below is the fix for this:

Go into: app/design/frontend/default/blue/template/contacts and modify the form.phtml.  On (or around) line# 32, replace:

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

with

<form action=”<?php echo Mage::getUrl(); ?>contacts/index/post/” id=”contactForm” method=”post”>

and you should be ready to go.

Bookmark and Share


e-commerce, magento, technical notes , ,

  1. Nuno
    July 1st, 2009 at 17:09 | #1

    Any ideia of what I need to change if i create a cms page called contactos (www.domain.com/contactos) ?

    Can’t get this to work there.

  2. wetwet
    March 18th, 2010 at 02:48 | #2

    I search already but i dont get the right answer cuz i dont know how to call this problem.

    I have a contact form at the sidebar of my magento.

    But when the page loaded, it automatically displays the midle of the page where the mini-contact form is placed.

    I saw that the insertion point was on the first textbox of the mini-contact form even though i didnt click on it.

    See the problem here. http://amazingpropertyinflorida.com/amazingpropertyinmarbella/

    When the page loaded, it does not display the header and menu but it will display the midle part of the web.

    I hope you got what i want to say. and i hope you can help me with my problem.

    Thanks in advance.

  3. August 6th, 2010 at 07:06 | #3

    Worked awesome! I will put a link on my website!

  1. No trackbacks yet.