Please have a look at the following snippet https://jsfiddle.net/simbunch/1kvfg7h0/3/
As you can see, the script is using pure JS. As it turns out, onsubmit="return false"
does not work when the form is selected using pure JS, whereas if I change the submit code to $('#myform').submit()
, then the onsubmit
works.
My problem is, I cannot edit the script part (CMS environment). What I want to do is to basically stop the form from submitting. Thanks in advance!
-edit- The issue seems to be related to Firefox. The snippet works as expected in Chrome.