-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
21 lines (18 loc) · 853 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
document.getElementById('reviewForm').addEventListener('submit', function (event) {
if (!this.checkValidity()) {
event.preventDefault();
event.stopPropagation();
} else {
event.preventDefault();
const fullName = document.getElementById('fullName').value;
const email = document.getElementById('email').value;
const rating = document.getElementById('rating').value;
const review = document.getElementById('review').value;
document.getElementById('modalFullName').innerText = fullName;
document.getElementById('modalEmail').innerText = email;
document.getElementById('modalRating').innerText = rating;
document.getElementById('modalReview').innerText = review;
$('#reviewModal').modal('show');
}
this.classList.add('was-validated');
});