mcpacific Posted May 26, 2014 Share Posted May 26, 2014 I'm in the process of creating a custom provisioning module. In the module, I've added a custom function similar to this: function mycustommodule_DoSomething($params); php code goes here... return "success"; I also have the following code to enable the custom template itself: function mycustomtemplate_ClientAreaCustomPage($params) { $pagearray = array( 'templatefile' => 'custompage', 'breadcrumb' => ' > <a href="#">Custom Page</a>', 'vars' => array( 'variable1' => $params['customfields']['Account ID'], 'variable2' => $params['configoption1'], 'variable3' => $params['configoption2'], ), ); return $pagearray; } and function mycustommodule_ClientAreaCustomButtonArray() { $buttonarray = array( "Custom Page" => "custompage", ); return $buttonarray; } In my custom Client Area template, I've put in the following form: <form method="post" action="clientarea.php?action=productdetails"> <input type="hidden" name="id" value="{$serviceid}" /> <input type="hidden" name="modop" value="custom" /> <input type="hidden" name="a" value="DoSomething" /> <input type="submit" value="Do It" /> </form> After hitting the submit button I'm returned to the product summary page (clientareaproducts.tpl) and no error message is displayed. I've enabled error reporting & display but nothing. Anyone have an idea why it's not working? 0 Quote Link to comment Share on other sites More sharing options...
mcpacific Posted May 26, 2014 Author Share Posted May 26, 2014 Ok, I guess I figured out how to make it work. I'm wondering if the documentation as stated wasn't meant for implementing the form in the custom template ('clientarea.tpl") file. Just in case anyone else gets aggravated by this, modifying the following line seems to make it work fine: <input type="hidden" name="id" value="{$id}" /> Now, the next challenge... how to return the user to the original custom template file for the result. It seems to always want to return the user to the default productdetails (summary) page... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.