Question

I made a custom form module which has its own DB table that was supposed to get data from the form submission

this is my Form

<form method="post" action="<?php echo Mage::getUrl('merchant/index/save')?>" id="merchant-reg" >
    <fieldset>
        <div class="lableninput">
            <label for="name">Name</label>
            <input type="text" name="name" class="required-entry" />
        </div>
        <div style="clear:both"></div>

        <div class="lableninput">
            <label for="email">Email</label>
            <input type="email" name="email" class="required-entry validate-email"/>
        </div>
        <div style="clear:both"></div>

        <div class="lableninput">
            <label for="store_name">Store Name</label>
            <input type="text" name="store_name" class="required-entry"/>
        </div>
        <div style="clear:both"></div>

        <input type="submit" value ="Procced to Checkout"/>
    </fieldset>
</form>
</body>
<script type="text/javascript">
    //<![CDATA[
        var dataForm = new VarienForm('merchant-reg', true)
    //]]>
</script>
</html>

and this my controller

 public function saveAction()
 {
     $this->getRequest()->getPost();

     echo "<pre>";
     print_r($this);
     echo "<pre>";

     $fromdata = Mage::getSingleton('frontend/session')->getData('merchant-reg');

     print_r($fromdata);

     $data = Mage::getSingleton("frontend/session")->getFormData(true);

     echo "<pre>";
     print_r($data);
 }

I have tried all three ways to get form data but no luck what am I doing wrong?

this is my model code

class Eshop_Merchant_Model_Merchnat extends Mage_Core_Model_Abstract
{
    protected function _construct(){

       $this->_init("merchant/merchant");

    }

}

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top