Bypass HTML “required” attribute when submitting [duplicate]
This question already has an answer here: Required attribute HTML5 7 answers I use required for a 1st check before submitting a form. <form action="myform.php"> Foo: <input type="text" name="someField" required="required"> <input type="submit" value="submit"> <input type="submit" value="ignore"> </form> Problem is, that I have an "ignore" button, which submits the form as well and the backend logic then sets a correct state in a DB. In this case (ignore) the validation is not desired (because there is no need to fill in field "Foo"). What's the best way to handle the 2 scenarios? I am aware