rafz Posted January 18, 2017 Share Posted January 18, 2017 Hello guys, I created a module that allows the client to submit a form, but I can't get the data from this form from a controller created by me. my controller: class MyFormModuleFrontController extends ModuleFrontController { public function __construct() { parent::__construct(); $this->context = Context::getContext(); } public function postProcess(){ if (Tools::isSubmit('mymod_product')) { var_dump($_POST); die('I\'m here!!'); } } ... A part of the form code ... <form action="{$link->getModuleLink('mymod')}" method="post" id="mymod_frm" enctype="multipart/form-data"> <div class="mymod_form_container"> <div class="intro_form">{$terms}</div> <div class="left"> ... <p class="submit"> <input id="mymod_product" name="mymod_product" type="hidden" value="{$product->id|escape:'htmlall':'UTF-8'}" /> .... The structure of my module: .../modules/mymod/controllers/MyForm.php (controller) .../modules/mymod/views/template/front/form.tpl (form page) Link to comment Share on other sites More sharing options...
rafz Posted January 18, 2017 Author Share Posted January 18, 2017 Anyone? Grrr!! Link to comment Share on other sites More sharing options...
bellini13 Posted January 19, 2017 Share Posted January 19, 2017 what does this resolve to? since you are using that for your forms action url, you need to ensure it resolves to your custom controller, which it does not {$link->getModuleLink('mymod')} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now