How send a form with Javascript when input name is “submit”?

Worth noting: It’s often a lot easier to just change the input name to something other than “submit”. Please use the solution below only if that’s really not possible.

You need to get the submit function from a different form:

document.createElement('form').submit.call(document.getElementById('redirectForm'));

If you have already another <form> tag, you can use it instead of creating another one.

Leave a Comment