I'd like that if allowSubmit
is false, it would not execute the action of form
( action="logintest.php"
).
How can I do this?
function check_if_capcha_is_filled (e) {
if(allowSubmit)
return true;
else{
alert('Fill in the capcha!');
//Código aqui
}
}
<form method="post" onsubmit="check_if_capcha_is_filled()" action="logintest.php">