chore: debug
This commit is contained in:
parent
d417ef1eb4
commit
217ce222f3
5 changed files with 18 additions and 4 deletions
|
@ -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>
|
Reference in a new issue