Formstorkdocs
PricingENTRDashboard

jQuery

jQuery still powers plenty of production sites, and wiring one of its forms to Formstork takes only a few lines. You can drop in the @formstork/js SDK or write a small jQuery submit handler that posts to the API yourself.

Using the @formstork/js SDK

npm install @formstork/js
import { formstork } from "@formstork/js";

const form = document.querySelector("#contact");
formstork(form, {
  accessKey: "YOUR_ACCESS_KEY",
  onSuccess: () => alert("Thanks, your message was sent."),
  onError: (message) => alert(message),
});

formstork(form, options) attaches a submit handler, collects the fields, and posts them for you, so you never touch the network call.

Plain jQuery submit handler

Prefer to stay dependency free? Add a hidden access_key field and post the form yourself:

<form id="contact">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="email" name="email" required />
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>
$("#contact").on("submit", async function (e) {
  e.preventDefault();
  const res = await fetch("https://api.formstork.com/submit", {
    method: "POST",
    body: new FormData(this),
    headers: { Accept: "application/json" },
  });
  const data = await res.json();
  alert(data.message);
  if (data.success) this.reset();
});

The Accept: application/json header tells Formstork to reply with JSON, so you can read data.success and show data.message to your visitor.

Step by step

  1. Sign up at app.formstork.com and copy your free access key from the dashboard.
  2. Add a form with a hidden access_key input set to YOUR_ACCESS_KEY.
  3. Load jQuery, then either install @formstork/js or paste the submit handler above.
  4. Bind the handler to the form’s submit event and call preventDefault to stop the page reload.
  5. Post the FormData to https://api.formstork.com/submit with the Accept: application/json header.
  6. Read data.success and show data.message to the visitor.
  7. Send a test message and confirm it lands in your dashboard.

The free plan covers 250 submissions a month, which is plenty to launch a contact form.