2

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

Ideeas?

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">
    <adminhtml_customer_edit>
        <reference name="customer_edit_tab_view">
            <action method="setTemplate">
                <template>customcustomerfields/customer/tab/view.phtml</template>
            </action>
        </reference>
    </adminhtml_customer_edit>
</layout>
6
  • Please explain "added a form to customer page from backend"; how did you do this?
    – benmarks
    Commented Aug 26, 2015 at 15:58
  • @benmarks : but there shoud be a way to construct a link based on module controller action and so on. No? Commented Aug 26, 2015 at 16:01
  • what I tried was Mage::helper("adminhtml")->getUrl("module/adminhtml_index/edit/") Commented Aug 26, 2015 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
    Commented Aug 26, 2015 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
    Commented Aug 26, 2015 at 19:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.