Skip to content

Instantly share code, notes, and snippets.

@tvdeyen

tvdeyen/git.log Secret

Created Apr 23, 2020
Embed
What would you like to do?
Netlify forms git log
commit a19c0201eb2a4de19f0ceb9ed80fe9b1130bc8b6
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:50:41 2020 +0200
Remove the hidden form-name field
It didnt work
diff --git a/components/Contact.vue b/components/Contact.vue
index 193fa0f..30f5285 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -67,7 +67,6 @@
</label>
</p>
<p>
- <input type="hidden" name="form-name" value="Kontakt" />
<Button>Senden</Button>
</p>
</form>
commit 7fb67528ad0c91dd010a313409f020ed1b897149
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:47:32 2020 +0200
Add a hidden form-name field
diff --git a/components/Contact.vue b/components/Contact.vue
index c49da20..193fa0f 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -25,7 +25,7 @@
action="/kontakt/danke/"
method="POST"
class="lg:pl-5 flex-1 lg:pr-20"
- data-netlify="true"
+ netlify
netlify-honeypot="nutrition"
>
<p class="hidden">
@@ -67,6 +67,7 @@
</label>
</p>
<p>
+ <input type="hidden" name="form-name" value="Kontakt" />
<Button>Senden</Button>
</p>
</form>
commit 4e395dda16afa3d40e7f5b1417b49c40e537bbef
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:40:06 2020 +0200
Use data-netlify attribute
Does the form work now?
diff --git a/components/Contact.vue b/components/Contact.vue
index 30f5285..c49da20 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -25,7 +25,7 @@
action="/kontakt/danke/"
method="POST"
class="lg:pl-5 flex-1 lg:pr-20"
- netlify
+ data-netlify="true"
netlify-honeypot="nutrition"
>
<p class="hidden">
commit e76af787e6281119a40fdb3756f4a1e9822b30ba
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:36:46 2020 +0200
Add a honeypot to contact form
diff --git a/components/Contact.vue b/components/Contact.vue
index 4d5a374..30f5285 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -21,29 +21,33 @@
</p>
</div>
<form
- name="contact"
+ name="Kontakt"
action="/kontakt/danke/"
method="POST"
class="lg:pl-5 flex-1 lg:pr-20"
netlify
+ netlify-honeypot="nutrition"
>
+ <p class="hidden">
+ <label>Nope: <input name="nutrition" /></label>
+ </p>
<p>
<label>
Ihr Name:<br />
- <Input type="text" name="name" />
+ <Input type="text" name="Name" />
</label>
</p>
<p>
<label>
Ihre E-Mail-Adresse:<br />
- <Input type="email" name="email" />
+ <Input type="email" name="E-Mail" />
</label>
</p>
<p>
<label>
Betreff:<br />
<select
- name="betreff"
+ name="subject"
class="border rounded border-gray p-3 w-full appearance-none cursor-pointer"
>
<option value="demo">Ich möchte eine Demo</option>
@@ -56,7 +60,7 @@
<label>
Nachricht:<br />
<textarea
- name="nachricht"
+ name="Nachricht"
class="border rounded border-gray p-3 w-full appearance-none"
rows="5"
></textarea>
commit 807fd44a4efde87d3489251a41b98e73adc81dc4
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:18:39 2020 +0200
Fix contact form action
diff --git a/components/Contact.vue b/components/Contact.vue
index b4e8df0..4d5a374 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -22,7 +22,7 @@
</div>
<form
name="contact"
- action="/kontakt/danke"
+ action="/kontakt/danke/"
method="POST"
class="lg:pl-5 flex-1 lg:pr-20"
netlify
commit 4247eeac2de473902086571a4f8cf87e6d5e113e
Author: Thomas von Deyen <thomas@vondeyen.com>
Date: Thu Apr 23 09:12:37 2020 +0200
Add contact success page
diff --git a/components/Contact.vue b/components/Contact.vue
index de78168..b4e8df0 100644
--- a/components/Contact.vue
+++ b/components/Contact.vue
@@ -20,7 +20,13 @@
10.00 - 18.00 (Mo-Fr)
</p>
</div>
- <form name="contact" method="POST" class="lg:pl-5 flex-1 lg:pr-20" netlify>
+ <form
+ name="contact"
+ action="/kontakt/danke"
+ method="POST"
+ class="lg:pl-5 flex-1 lg:pr-20"
+ netlify
+ >
<p>
<label>
Ihr Name:<br />
diff --git a/pages/kontakt/danke.vue b/pages/kontakt/danke.vue
new file mode 100644
index 0000000..d5dc5db
--- /dev/null
+++ b/pages/kontakt/danke.vue
@@ -0,0 +1,22 @@
+<template>
+ <main>
+ <Section class="text-center">
+ <h1>Vielen Dank!</h1>
+ <p>
+ Wir melden uns umgehend bei Ihnen.
+ </p>
+ <p>
+ Viele Grüße und einen schönen Tag.<br />
+ Das gesammte Team von Blish
+ </p>
+ <nuxt-link to="/">
+ Hier geht es zurück
+ </nuxt-link>
+ </Section>
+ </main>
+</template>
+
+<script>
+ import Section from "~/components/Section"
+ export default { components: { Section } }
+</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment