Im currently trying to do a form that requires the user to enter valid information.
For instance Here's a classic form: jsfiddle
I want the user to put name and address. But I want the button to be unclickable until the user inputs his Name and his Email(in a correct form).
Is there any property that lets me access if a button is unclickable? Something like:
function validateButtonSubmit {
if (validateEmail(email)) {
if (validateName(name)) {
document.getElementById("submitButton").clickable = true;
}
}
}
Whats the best way to accomplish this, am I going in the right direction?