Formcask

← Guides

Hugo contact form without a backend

Drop a form partial into a Hugo site and collect messages through Formcask.

Hugo generates HTML only. Put a partial such as layouts/partials/contact-form.html on your contact page:
<form action="https://formcask.com/f/f_YOUR_FORM_ID" method="POST">
  <p><label>Name<input type="text" name="name" required></label></p>
  <p><label>Email<input type="email" name="email" required></label></p>
  <p><label>Message<textarea name="message" required></textarea></label></p>
  <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
  <input type="hidden" name="_redirect" value="{{ "/thanks/" | relURL }}">
  <button type="submit">Send</button>
</form>
If the thank-you URL is on another host, use an absolute https:// link. Rebuild with hugo as usual. No Hugo modules or server-side hooks are required. Agencies can put each client site in its own Formcask workspace on the Pro or Agency plan.