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
Post a Comment