After the form submits using the "deletedetails" method, some times the action is called twice which leads to some undesired results (like trying to delete an already deleted record from a database). As I mentioned, this behaviour is not consistent and at times the action is called only once as desired.
You attached an image of some code rather than just typing it in or cut-and-pasting?!?! Come on.
I also don't see any reason to use an image input there if all you really need is an image.