Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/aerohub/hugo-identity-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Ruel <cyril.ruel@gmail.com>2017-08-17 23:47:12 +0300
committerCyril Ruel <cyril.ruel@gmail.com>2017-08-22 00:46:32 +0300
commitb2c96e366f2a18422218a94659a7c04280037d4c (patch)
treeccf1d946d2f1da5036ce7a15b1c9873d2a4543d7
parent1baca1178293b996691af10f4e07805532dadbaf (diff)
Add _gotcha field in formspree.io contact form
According to the formspree.io documentation, this field is a "honeypot" which avoid spam by fooling scrapers. If a value is provided, the submission will be silently ignored. The input should be hidden with CSS.
-rw-r--r--layouts/partials/contact.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html
index 8571634..5f888ad 100644
--- a/layouts/partials/contact.html
+++ b/layouts/partials/contact.html
@@ -2,6 +2,7 @@
<h2>{{ .Site.Params.contact.title }}</h2>
{{ if not .Site.Params.contact.postURL }}
<form action="https://formspree.io/{{ with .Site.Params.contact.email }}{{.}}{{ end }}" method="post" name="sentMessage" id="contactForm" novalidate>
+ <input type="text" name="_gotcha" style="display:none" />
{{ else }}
<form action="{{ .Site.Params.contact.postURL }}" method="POST" name="sentMessage" id="contactForm" novalidate>
{{ end }}