SteveLane / hugo-icon

Icon theme for Hugo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable url for contacts form

mr-tron opened this issue · comments

Please add parameter to configuration file for changing action in contacts form.
https://github.com/SteveLane/hugo-icon/blob/master/layouts/partials/contact-form.html#L9
For example https://formspree.io/ supports same fields so netlify can be transparent replaced with self-hosted server + formspree

Hi @mr-tron - are you able to submit a pull request for how you see this working?

Yes. I am going to do this, but i don`t know when.

@mr-tron, The following worked for me.
First, I checked Formspree on the online test with my e-mail.
Then, I modified contact-form as:

{{ with .Site.Params.contact }}

{{ .title }}

{{ .message | markdownify }}

{{ end }}
<textarea name="message" placeholder="message"></textarea> Send

Then, the config.toml as:

Contact section

[params.contact]
enable = true
title = "Contact"
message = "text."

commented

@SteveLane and @mr-tron I created a pull request for conversion to formspree. It can either be merged as is or used as inspiration for something that supports both netlify and formspree.

#31

Thanks @Phinatic - I'll leave as is, as I'm happy with netlify, and don't have the time to parameterise the form to accept either. If you implemented a version that used either, I'd be happy to check it out further and perhaps pull it in.