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

github.com/SteveLane/hugo-icon.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lane <lane.s@unimelb.edu.au>2017-09-21 14:35:11 +0300
committerSteve Lane <lane.s@unimelb.edu.au>2017-09-21 14:35:11 +0300
commit818d18eef0c9bffa05158c8e1bed19f54e84147e (patch)
tree265915db1885bdb6e96ac757d18a6ae53eb7fc8b
parentc80a3a2992766786edb06e379f9cab4509751c92 (diff)
contact form to work with netlify
-rw-r--r--changelog.md3
-rwxr-xr-xlayouts/partials/contact-form.html17
2 files changed, 14 insertions, 6 deletions
diff --git a/changelog.md b/changelog.md
index ba40bb4..9007b56 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,4 +2,5 @@
## 2017-09-21
-Theme ported to Hugo with no changes made to styling/theming.
+- Theme ported to Hugo with no changes made to styling/theming.
+- Adjusted contact form to work with netlify
diff --git a/layouts/partials/contact-form.html b/layouts/partials/contact-form.html
index bcedfc2..ee1f1f3 100755
--- a/layouts/partials/contact-form.html
+++ b/layouts/partials/contact-form.html
@@ -6,26 +6,33 @@
<p>{{ .message | markdownify }}</p>
{{ end }}
</div>
- <form action="#" method="post">
+ <form name="contact-form" netlify-honeypot="_gotcha" action="thank-you" netlify>
<div class="row">
<div class="col-md-6">
<div class="form-group">
- <input type="text" name="name" class="form-control" placeholder="Your name">
+ <!-- <label for="inputName">First name</label> -->
+ <input type="text" class="form-control" id="inputName" placeholder="Your first name">
+ <!-- <label for="inputLastName">Last name</label> -->
+ <input type="text" class="form-control" id="inputLastName" placeholder="Your last name">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
- <input type="email" name="email" class="form-control" placeholder="Your email">
+ <input type="email" class="form-control" id="inputEmail" placeholder="Your email" name="_replyto">
+ <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
- <textarea name="message" id="" cols="30" rows="7" class="form-control" placeholder="Your message"></textarea>
+ <textarea class="form-control" id="inputBody" cols="30" rows="7" placeholder="Please enter a message." name="message"></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
- <input type="submit" name="submit" value="Send message" class="btn btn-primary btn-outline">
+ <input type="hidden" name="_subject" value="New website query">
+ <input type="text" name="_gotcha" style="display:none">
+ <button type="submit" class="btn btn-primary btn-outline" value="Send">Submit</button>
+ <!-- <input type="submit" name="submit" value="Send message" class="btn btn-primary btn-outline"> -->
</div>
</div>
</div>