Magento 2 – Admin Form Redirecting to Dashboard

adminadminformformsmagento2

I am trying to store the value in custom table from admin form but it is always redirect to admin dashboard when I submit the form.

form page admin url: http://magentodev.gworks.mobi/magento2/admin/gworksrc/cancel/

<form action="/magento2/admin/gworksrc/cancel/" method="post">
 <input type="number" name="timeinterval" id="timeinterval" />
 <input type="submit" value="SUBMIT" id="timesubmit" />
</form>

I have tried with various type of action URL but nothing work

 action=<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>
 action=""
 action="<?php echo $this->getUrl('gworksrc/cancel/index'); ?>"

I found the same problem here, but it is syntax error but my form look simple I can't found any syntax error.

Thanks

Best Answer

You form must have form key to allow submit data. See formkey.phtml that used in core forms