If you say you use anyway the JS to submit the data in the form why not cancel the default behaviour of the browser with
. This way no matter if you press the submit button or press enter in an input it won't be sent. The onsubmit="return false" shouldn't interfere with calling the submit() method on the form from JS.