Reputation: 73
Where can I find the code for the dialog box? I would like to have a dialog box for the password textbox as well.
Upvotes: 0
Views: 20
Reputation: 3968
You can get "this field is required"
by using attribute "required"
like:
<form name="myForm">
<input type="password" name="psw">
</form>
if you want custom message on password field you can do so by native javascript alert like:
function validateForm() {
var x = document.forms["myForm"]["psw"].value;
if (x == "") {
alert("Password is required");
return false;
}
}
or you can use jquery plugins to show custom message with custom styling with sweet alert
see this link for more http://t4t5.github.io/sweetalert/
Upvotes: 2