chore: debug

This commit is contained in:
Cory Dransfeldt 2024-06-10 10:17:34 -07:00
parent d417ef1eb4
commit 217ce222f3
No known key found for this signature in database
5 changed files with 18 additions and 4 deletions

View file

@ -15,7 +15,7 @@ description: How to contact me.
<li>File an issue on the appropriate repo over at <a href="https://github.com/cdransf">GitHub</a></li>
</ul>
</div>
<form class="column" method="POST" action="https://coryd.dev/api/contact" name="contact">
<form data-form="contact" class="column" method="POST" action="https://coryd.dev/api/contact" name="contact">
<label class="hidden">
Don't fill this out if you're human: <input type="text" name="hp_name">
</label>
@ -33,3 +33,16 @@ description: How to contact me.
</div>
</form>
</div>
<script>
document.querySelector('[data-form="contact"]').addEventListener('submit', function(event) {
if (typeof plausible === 'function') {
plausible('Contact form submitted', {
props: {
name: this.name.value,
email: this.email.value,
message: this.message.value
}
})
}
})
</script>