Points to keep in mind while developing custom form in Magento 2 module on admin end.

Two things keep in mind


1) Form action could be defined as

<?php echo $this-&gt;getUrl("pilot_smile/options/save"); ?>;

2) Do not forget to add form_key else you would be going to waste your several hours on finding the dashboard redirection issue on form submission.

<input name="form_key" type="hidden" value="<?php echo $block->getFormKey()?>" />;