I added a form to customer page from backend. How do I create the URL for action attribute to a certain function ( public function editAction(){...} )? Function that is founded in app/code/local/company/module/controllers/Adminhtml/IndexController.php


The form is used to set a custom customer attribute created in that module. The form only contains the input and a button for submit. In that particular action I setCustomAttribute and send an email. But every time I submit I get that 404.

This is the layout for my template:

<layout version="0.1.0">
        <reference name="customer_edit_tab_view">
            <action method="setTemplate">
  • Please explain "added a form to customer page from backend"; how did you do this? – benmarks Aug 26 '15 at 15:58
  • @benmarks : but there shoud be a way to construct a link based on module controller action and so on. No? – Dan Ovidiu Boncut Aug 26 '15 at 16:01
  • what I tried was Mage::helper("adminhtml")->getUrl("module/adminhtml_index/edit/") – Dan Ovidiu Boncut Aug 26 '15 at 16:01
  • Two things. First: "I added a form to customer page from backend" - how did you do this? I'm asking because I need to know in what context you are trying to generate the URL. Second: are you trying to get the a form which is filled in by the customer to post to an action in an admin controller? – benmarks Aug 26 '15 at 16:34
  • 2
    I understand - please add your admin router configuration XML and we can get your question answered. Also, why the custom template? – benmarks Aug 26 '15 at 19:01

Your Answer

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

Browse other questions tagged or ask your own question.