Share your experience and help other guests make informed decisions
below).
const recaptchaSiteKey = "6Ldq-YctAAAAAB2jAlPOq8j9u3pyEUhxEh-KZ6hb";
let recaptchaDone = false;
$('#reviewForm').on('submit', function(e) {
const rating = $('input[name="rating"]:checked').length;
const reviewText = $('#review_text').val();
if (!rating) {
e.preventDefault();
alert('Please select a rating');
return false;
}
if (reviewText.length < 20) {
e.preventDefault();
alert('Please write at least 20 characters for your review');
return false;
}
// reCAPTCHA v3: fetch a fresh token, drop it in the hidden field,
// then resubmit for real. recaptchaDone guards against re-entry.
if (recaptchaSiteKey && !recaptchaDone && typeof grecaptcha !== 'undefined') {
e.preventDefault();
const form = this;
const $btn = $(form).find('button[type="submit"]').prop('disabled', true);
grecaptcha.ready(function() {
grecaptcha.execute(recaptchaSiteKey, { action: 'submit_review' })
.then(function(token) {
$('#recaptchaToken').val(token);
recaptchaDone = true;
form.submit();
})
.catch(function() {
// If the token can't be fetched, submit anyway and
// let the server decide (it fails open on outages).
recaptchaDone = true;
$btn.prop('disabled', false);
form.submit();
});
});
return false;
}
});
}
// Initialize all components
initStarRating();
initCharacterCounter();
initFormValidation();
});
});
Cookie Consent
We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. You can accept all cookies, reject non-essential ones, or customize your choices.
Learn more in our
Cookie Policy.