How to add a form to Qwik

Send a Qwik form to FormTango from the browser, without a routeAction$ or server code.
  1. 1

    Create a free FormTango account and add a form. Copy its endpoint, which looks like https://formtango.com/f/YOUR_FORM_ID.

  2. 2

    Add this component, replacing YOUR_FORM_ID.

  3. 3

    Submit the form once. The submission appears in your FormTango inbox and you get an email.

tsx
import { component$, useSignal, $ } from '@builder.io/qwik';

export default component$(() => {
  const status = useSignal('idle');

  const send = $(async (_: Event, form: HTMLFormElement) => {
    status.value = 'sending';
    const response = await fetch('https://formtango.com/f/YOUR_FORM_ID', {
      method: 'POST',
      headers: { Accept: 'application/json' },
      body: new FormData(form),
    });
    status.value = response.ok ? 'sent' : 'error';
  });

  return status.value === 'sent' ? (
    <p>Thanks! We got your message.</p>
  ) : (
    <form preventdefault:submit onSubmit$={send}>
      <input type="email" name="email" required />
      <textarea name="message" required />
      <button disabled={status.value === 'sending'}>Send</button>
    </form>
  );
});

What you get

  • Every submission saved in an inbox you can search and export.
  • An email for each one, with the visitor's address as the reply-to.
  • Spam filtering without making visitors solve a puzzle.
  • Problems? See troubleshooting.

Related guides

HTMLJavaScript (no page reload)ReactNext.jsAstro

Last reviewed November 19, 2026.