diff --git a/main-site/contact-form.js b/main-site/contact-form.js index 5cfb022..7f04624 100644 --- a/main-site/contact-form.js +++ b/main-site/contact-form.js @@ -141,13 +141,15 @@ return; } - const altchaWidget = form.querySelector('altcha-widget'); - const altchaValue = altchaWidget ? altchaWidget.value : ''; + const errAltcha = document.getElementById('err-altcha'); + if (errAltcha) errAltcha.style.display = 'none'; + + const altchaInput = form.querySelector('[name="altcha"]'); + const altchaValue = altchaInput?.value || ''; if (!altchaValue) { - const errEl = document.getElementById('err-altcha'); - if (errEl) { errEl.style.display = ''; } + if (errAltcha) errAltcha.style.display = ''; showAlert('Please complete the verification.', 'is-warning'); - altchaWidget && altchaWidget.scrollIntoView({ behavior: 'smooth', block: 'center' }); + form.querySelector('altcha-widget')?.scrollIntoView({ behavior: 'smooth', block: 'center' }); return; } diff --git a/main-site/contact/index.html b/main-site/contact/index.html index 3107073..adb28b7 100644 --- a/main-site/contact/index.html +++ b/main-site/contact/index.html @@ -145,7 +145,7 @@
diff --git a/main-site/index.html b/main-site/index.html index a3046d6..55b0e54 100644 --- a/main-site/index.html +++ b/main-site/index.html @@ -220,7 +220,7 @@