Home Ask Login Register

Developers Planet

Your answer is one click away!

zomato February 2016

Getting the controller for a form in magento

I have this action defined in my form.phtml (Environment is magento).

form action="getUrl('contacts/index/post')

Now I need to know which controller is getting called so I can get the values in the backend.


Andre Ferraz February 2016

That is pretty straight forward. The first word contacts is the front-name which in magento standards is the module name. The second word index is the controller file name and the last word post is the action of the controller.

Because thats a core controller, you can find the file under /app/code/core/Mage/Contacts/controllers/IndexController.php

Look at the postAction() function.

Post Status

Asked in February 2016
Viewed 1,877 times
Voted 13
Answered 1 times


Leave an answer

Quote of the day: live life