javascript - PHP one form with two submit buttons and different validation -


i have single form 2 submit buttons , there's javascript validation in form, possible activate validation in 1 of submit buttons? tried create input button instead of input submit onclick event , submit through javascript function, didn't work.

<form id="myform" action="my_action.php" method="post" enctype="multipart/form-data" onsubmit="return isvalidform();">     <!-- ... -->     <input type="submit" name="auto" />     <input type="submit" name="manual"/> </form> 

you're on right track moving event handler submit button, shouldn't stop being submit button.

<form id="myform" action="my_action.php"       method="post" enctype="multipart/form-data">     <!-- ... -->     <input type="submit" name="auto" onclick="return isvalidform();">     <input type="submit" name="manual"> </form> 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -