SolidJS logo

A backend for your SolidJS forms

Keep full control over the look and feel of your SolidJS forms.

SolidJS is a declarative JavaScript library for creating user interfaces with fine-grained reactivity.

Getting started with SolidJS is simple

Start collecting data in a matter of clicks.

Let Formspark take care of the servers, databases, and analytics.

Set up any form in seconds.

jsx
import { createSignal } from "solid-js";

const FORMSPARK_ACTION_URL = "https://submit-form.com/your-form-id";

function ContactForm() {
  const [message, setMessage] = createSignal("");
  const [submitting, setSubmitting] = createSignal(false);

  const onSubmit = async (e) => {
    e.preventDefault();
    try {
      setSubmitting(true);
      await fetch(FORMSPARK_ACTION_URL, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify({
          message: message(),
        }),
      });
      setMessage("");
      alert("Form submitted");
    } finally {
      setSubmitting(false);
    }
  };

  return (
    <form onSubmit={onSubmit}>
      <textarea value={message()} onInput={(e) => setMessage(e.target.value)} />
      <button type="submit" disabled={submitting()}>
        Send
      </button>
    </form>
  );
}

export default ContactForm;
Start collecting submissions with Formspark

Formspark is a reliable backend for your forms.

Keep full control over the look and feel of your forms.

Let Formspark take care of the rest.

No credit card required