Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nima-maghooli authored Apr 19, 2024
1 parent ecd5594 commit 9f6ddea
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,29 @@ window.onload = function() {
}
}




<script>
function validateForm() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var telephone = document.getElementById("telephone").value;

var response = grecaptcha.getResponse();
if (name === "" || email === "" || telephone === "") {
alert("Please fill out all fields");
return false;
}

if (response.length === 0) {
alert("Please complete the reCAPTCHA");
return false;
}
}
</script>




})()

0 comments on commit 9f6ddea

Please sign in to comment.