This commit is contained in:
tuxwarrior
2023-06-19 14:35:42 +00:00
parent ebb4ef1132
commit 9725164ddf

View File

@@ -41,40 +41,41 @@
<!--input type="file" name="attachment" /-->
<!-- Custom Form Data: Form data you wish to receive in email. -->
E-mail:
[email]:
<br>
<input type="email" style="width: 500px;" name="Email" required>
<br>
<br>
Name:
[name]:
<br>
<input type="text" style="width: 500px;" name="Name" required>
<br>
<br>
Message:
[message]:
<br>
<textarea name="message" maxlength="1000" style="width: 500px; height: 250px;" required></textarea>
<br>
<br>
[comment_1]
hello, world!
<div class="h-captcha" data-captcha="true"></div>
[/comment_1]
<br>
<button type="submit">Send message</button>
</form>
<script src="https://web3forms.com/client/script.js" async defer></script>
<!--script src="https://web3forms.com/client/script.js" async defer></script-->
<script>
const form = document.getElementById('contact_form');
form.addEventListener('submit', function(e) {
<!--script>
const form = document.getElementById('contact_form');
form.addEventListener('submit', function(e) {
const hCaptcha = form.querySelector('textarea[name=h-captcha-response]').value;
if (!hCaptcha) {
e.preventDefault();
alert("Please fill out captcha field")
return
}
});
</script>
});
</script-->