I'm trying to get a success message on the contact page. When the form is send i want to show the message. So i need the post data from the form. I tried this:

$postdata = Mage::app()->getFrontController()->getRequest()->getPost('email');


$postdata = $this->getRequest()->getPost('email');


$postdata = $this->getRequest()->getParams();

But i don't get the post data

I want to display a success message, i thought that when i have the post data in the view i can make a if statment in the view to show the success message

  • you mean success notification? – Qaisar Satti Jun 3 '15 at 10:06
  • I don't use the default form but a extension and if i have a post value of 1 of the input fields than i want to show a success message @QaisarSatti – Esther Jun 3 '15 at 10:09
  • 1
    Can you edit your answer and explain the logic you are after? Are you after manipulating post data, or creating success messages? – Mayers Jun 3 '15 at 10:10
  • I don't want to manipulate the post data, i just want to show a success message @Mayers – Esther Jun 3 '15 at 10:15

This sounds like the formular is send to actionA, which redirects to actionB and you try to get the data in actionB, this is not possible. You need to save them somewhere, e.g. in the session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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