diff options
author | junichim <junichim@users.noreply.github.com> | 2020-11-04 10:41:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 10:41:45 +0300 |
commit | 0da0cd586b31910adacab46fe1f12dcec1ee6e72 (patch) | |
tree | 453b7c6913ede2de195733fa095c4d2849d5c4d8 | |
parent | 77a85be7e7149f79c996b00224175991e23a8612 (diff) |
fixed to Formspree new form style (#276)
* fixed to Formspree new form style
* change variable name to formspree_action
* change formspree_action variable to have all the url
-rw-r--r-- | exampleSite/config.toml | 13 | ||||
-rw-r--r-- | layouts/partials/contact.html | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ed76603..a4abbc0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -91,18 +91,19 @@ paginate = 10 # Since this template is static, the contact form uses www.formspree.io as a # proxy. The form makes a POST request to their servers to send the actual - # email. Visitors can send up to a 1000 emails each month for free. + # email. Visitors can send up to a 50 emails each month for free. # # What you need to do for the setup? # - # - set your email address under 'email' below + # - register your account to https://formspree.io/register + # - login and create new form + # - set your form's endpoint url under 'formspree_action' below # - upload the generated site to your server - # - send a dummy email yourself to confirm your account - # - click the confirm link in the email from www.formspree.io + # - test a dummy email yourself # - you're done. Happy mailing! # - # Enable the contact form by entering your Formspree.io email - email = "your@email.com" + # Enable the contact form by entering your Formspree.io endpoint url + formspree_action = "https://formspree.io/sample/of/endpoint" contact_form_ajax = false about_us = "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>" diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html index 738cfa9..5186e2e 100644 --- a/layouts/partials/contact.html +++ b/layouts/partials/contact.html @@ -7,7 +7,7 @@ {{ .Content }} - {{ if isset .Site.Params "email" }} + {{ if isset .Site.Params "formspree_action" }} <div class="heading"> <h3>{{ i18n "contactForm" }}</h3> @@ -15,7 +15,7 @@ <div id="contact-message"></div> - <form {{ with .Site.Params.contact_form_ajax }}class="contact-form-ajax"{{ else }}{{ end }} method="post" action="https://formspree.io/{{ .Site.Params.email }}"> + <form {{ with .Site.Params.contact_form_ajax }}class="contact-form-ajax"{{ else }}{{ end }} method="post" action="{{ .Site.Params.formspree_action }}"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> |