Update SPAM protection

This commit is contained in:
Erick Ruiz de Chavez 2021-02-11 22:11:20 -05:00
parent 7e9651001b
commit 6cb0c9263a

View file

@ -2,12 +2,18 @@
title: Contact title: Contact
--- ---
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<script>
<form action="https://palmiers.xyz/contact/contact.php" method="POST" class="flex flex-col" id="contact-form"> const accessTime = Date.now();
function formSubmit() {
document.querySelector('input[name="submit_time"]').value = parseInt((Date.now() - accessTime) / 1000, 10);
}
</script>
<form action="https://palmiers.xyz/contact/contact.php" method="POST" class="flex flex-col" onsubmit="formSubmit()">
<input type="hidden" name="id" value="921ccf38-4b10-4ea2-be56-4910d226155f"> <input type="hidden" name="id" value="921ccf38-4b10-4ea2-be56-4910d226155f">
<input type="hidden" name="redirect" value=""> <input type="hidden" name="redirect" value="">
<script> document.querySelector('input[name="redirect"]').value = `${location.protocol}//${location.host}${location.pathname}thanks.html` </script> <script> document.querySelector('input[name="redirect"]').value = `${location.protocol}//${location.host}${location.pathname}thanks.html` </script>
<input type="hidden" name="subject" value="ERCH Contact Form"> <input type="hidden" name="subject" value="ERCH Contact Form">
<input type="hidden" name="submit_time" value="0">
<label for="name" class="mt-4">Your name:</label> <label for="name" class="mt-4">Your name:</label>
<input type="text" required id="name" name="name" class="p-2 dark:bg-gray-700 dark:text-gray-200 border-2 valid:border-green-600"> <input type="text" required id="name" name="name" class="p-2 dark:bg-gray-700 dark:text-gray-200 border-2 valid:border-green-600">