Beginner5 min

How to Add a Custom Form to Webflow

Override Webflow's default form handling and send submissions to FormsList for more control over notifications, integrations, and data management.

Prerequisites

  • A Webflow project with a form element
  • A FormsList account (free)
  • Access to Webflow's custom code settings
1

Set up your FormsList endpoint

Create a FormsList account and add a new form. Copy your endpoint URL. Using FormsList with Webflow gives you features like email forwarding, Slack integration, and CSV exports that are not available with Webflow's built-in form handling on the free plan.

2

Build the form in Webflow and add custom code

Design your form in Webflow using the native form element. Then add custom JavaScript in the page's custom code settings (or the project-level custom code section) to intercept the form submission and send it to your FormsList endpoint instead of Webflow's default handler.

<!-- Add this to the "Before </body> tag" section in Webflow's custom code settings -->
<script>
  const form = document.querySelector("form");

  form.addEventListener("submit", async (e) => {
    e.preventDefault();
    e.stopPropagation();

    const submitBtn = form.querySelector("[type='submit']");
    const originalText = submitBtn.value || submitBtn.textContent;
    submitBtn.disabled = true;
    submitBtn.textContent = "Sending...";

    try {
      const res = await fetch("https://formslist.com/f/YOUR_FORM_HASH", {
        method: "POST",
        body: new FormData(form),
      });

      if (res.ok) {
        // Show Webflow's success state
        const successEl = document.querySelector(".w-form-done");
        const formEl = document.querySelector(".w-form");
        if (successEl) successEl.style.display = "block";
        if (formEl) formEl.style.display = "none";
        form.reset();
      } else {
        const errorEl = document.querySelector(".w-form-fail");
        if (errorEl) errorEl.style.display = "block";
      }
    } catch {
      const errorEl = document.querySelector(".w-form-fail");
      if (errorEl) errorEl.style.display = "block";
    } finally {
      submitBtn.disabled = false;
      submitBtn.textContent = originalText;
    }
  });
</script>
3

Publish and test

Publish your Webflow site and submit a test entry. Verify the submission appears in the FormsList dashboard. The Webflow success and error states should work as designed. Enable email notifications and any other integrations you need from the FormsList dashboard.

Frequently Asked Questions

Ready to collect form submissions?

Set up your form backend in under a minute. No server required, no complex configuration — just a simple endpoint for your forms.