I wish this helpful for you My form submit button has to be clicked twice before the form will submit. My professor gave me some Java Script code, which I've implemented below, that will click the submit button twice automatically, but it is not working. , So here is hot it would be your form part
it fixes the issue The debugger is stopping in the jQuery library because it's the first bit of code to execute as a result of the native submit event. jQuery handles that event, and then delegates the remaining handling code to you. If you continued to step through the code, you'd eventually get to your own handler. To avoid this, you can blackbox the jQuery library in the debugger. This will prevent it from stopping in the jQuery code, and go straight to your own code.
Form submit after preventDefault not working until click submit button