Posts

Showing posts with the label user-input

How to change normal behaviour of input submit button for unfilled and required inputs?

How to change normal behaviour of input submit button for unfilled and required inputs? Say you have an html form like the one below. <form> <input type="text" required> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <input type="submit"> </form> If you click on the submit button without filling the required input, three thing will generally happen. Here is a jsfiddle to see this in action.http://jsfiddle.net/q47kepd0/ I am working on a project where I am making an html file version of a wordpress theme. In the theme the first thing that involves scrolling does happen but the second and the third things don't. So there must be a w...