Form Integrations

Collect user data with various form backend services.

Formspree

The easiest way to handle form submissions:

1
2
3
4
# hugo.toml
[params.forms]
  provider = "formspree"
  formspreeId = "xyzabcde"

Then use the contact form shortcode:

1
{{< contact-form >}}

Netlify Forms

If hosting on Netlify, forms work automatically:

1
2
[params.forms]
  provider = "netlify"

Add the netlify attribute to your forms:

1
2
3
<form name="contact" method="POST" data-netlify="true">
  <!-- form fields -->
</form>

Custom Webhook

Send form data to your own backend:

1
2
3
[params.forms]
  provider = "webhook"
  webhookUrl = "https://api.yoursite.com/forms"

Spam Protection

Enable reCAPTCHA or honeypot fields:

1
2
3
[params.forms]
  honeypot = true
  recaptchaSiteKey = "your-site-key"