Formstork

FRAMEWORK

Handle form submissions in Ruby on Rails

Formstork is the backend that receives your Rails form's POST. Send your fields to the endpoint with your access key, and Formstork emails you each submission, sets the visitor's email as reply-to, and saves it to a searchable dashboard, no ActionMailer setup or database migration required.

How it works

A form in Ruby on Rails is ordinary HTML that posts to a controller action. To actually deliver a contact form you would normally add a Contact model and migration, configure ActionMailer with an SMTP provider, and write a mailer plus a controller to save and send each message. Formstork removes that plumbing. Point the form straight at the Formstork endpoint with your access key, and Formstork validates the submission, stores it, emails it to you with the visitor's address set as reply-to, and lists it in a searchable, taggable dashboard. It is just an HTTP POST, so the form's action attribute is enough. If you would rather keep the request server side, a controller can forward the fields with Net::HTTP to the same endpoint instead. From there you can route submissions to Slack, Notion, Google Sheets, or a signed webhook, all configured in the dashboard.

html
<%# app/views/contacts/new.html.erb %>
<%# Posts straight to Formstork, so no form_with and no authenticity_token. %>
<form action="https://api.formstork.com/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />

  <label>
    Name
    <input type="text" name="name" required />
  </label>

  <label>
    Email
    <input type="email" name="email" required />
  </label>

  <label>
    Message
    <textarea name="message" required></textarea>
  </label>

  <button type="submit">Send</button>
</form>

No ActionMailer or database to wire up

Collecting a form in Rails normally means a model, a migration, an ActionMailer setup with SMTP, and a controller to tie them together. Formstork is that backend, so you point your form at one endpoint and skip all of it.

Post from a view or forward from a controller

Because a submission is just an HTTP POST, the form's action attribute in your .html.erb view is enough. If you prefer to keep the request on the server, a controller can forward the same fields with Net::HTTP. Either way, no authenticity_token is needed since the request leaves your app.

Spam filtering and integrations included

Every form gets a honeypot and a server-side content filter, with optional Turnstile, hCaptcha, or reCAPTCHA. Each submission can also route to Slack, Discord, Telegram, Notion, Airtable, Mailchimp, Google Sheets, or a signed webhook.

Set it up

  1. 1In the Formstork dashboard, create a form and copy its access key.
  2. 2Add a plain HTML form to a Rails view (an .html.erb file) with a hidden input named access_key set to that key. Because it posts to an external endpoint, skip form_with and do not include the Rails authenticity_token.
  3. 3POST the fields to https://api.formstork.com/submit using the form's action attribute, or forward them from a controller with Net::HTTP.
  4. 4Submit the form once to test. Each submission now arrives by email and in your dashboard.

Frequently asked questions

How do I handle form submissions in Ruby on Rails?

Point your Rails form at the Formstork endpoint. Add a hidden access_key field and POST the fields to https://api.formstork.com/submit, either through the form's action attribute or by forwarding them from a controller with Net::HTTP. Formstork emails you each submission and stores it in your dashboard, so you do not need ActionMailer or a Contact model.

Do I need the Rails authenticity_token, and will I get InvalidAuthenticityToken?

No. The authenticity_token is Rails' CSRF protection for forms that post back to your own app. This form posts to the Formstork endpoint instead, so use a plain HTML form rather than form_with and leave the token out. Because the request never hits a Rails controller, you will not see ActionController::InvalidAuthenticityToken.

Is it free to start?

Yes. The free plan includes 250 submissions a month with the full dashboard, email delivery, spam filtering, integrations, and CSV and JSON export, with no credit card. Paid plans add more volume, forever retention, autoresponders, and file uploads.

Try Formstork free

250 submissions a month with a full dashboard. No credit card required.

Get your access keyRead the docs