Skip to content
Lazyform
Docs menu

Getting started

Quick start

Connect any HTML form to Lazyform in two minutes. One access key, one URL, and submissions arrive in your inbox.

Lazyform is a form backend. You keep your form exactly as it is, point it at our URL, and we store each submission, check it for spam and send it to you by email (and Telegram, Slack, a webhook or anything else you connect). There's no server to write and nothing to host.

1. Get an access key

Every form has its own access key. It looks like lf_ followed by letters and numbers.

  • Fastest: type your email on the home page. We email you a working key and a sign-in link. No password.
  • Or sign in, create a form in the dashboard and copy its key.

Submissions are sent to the email address you signed up with. You can add more recipients later.

2. Point your form at Lazyform

Set the form's action to the endpoint, use method="POST", and add your key as a hidden field. Every input needs a name: that's the label you'll see in the email.

contact.html
<form action="https://lazyform-api.xvelopers.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>

  <!-- Spam trap: people never see or tick this -->
  <input type="checkbox" name="botcheck" class="hidden" style="display:none">

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

That's the whole integration. When someone sends the form, they land on a thank-you page and you get an email.

Prefer not to have a hidden field? Post to https://lazyform-api.xvelopers.com/f/YOUR_ACCESS_KEY instead. The key in the URL works exactly the same.

3. Send a test

Open the page, fill in the form and send it. Within a few seconds you'll get an email with every field, the time and the page it came from. The submission is also in your dashboard.

Nothing arrived? Check your spam folder, then try the form tester, which sends a test submission and explains any error.

Using JavaScript instead

If your site is built with React, Vue, Svelte or similar, you'll usually want to stay on the page and show a message instead of redirecting. Send the form with fetch and ask for JSON:

js
const form = document.querySelector('form')

form.addEventListener('submit', async (event) => {
  event.preventDefault()
  const res = await fetch('https://lazyform-api.xvelopers.com/submit', {
    method: 'POST',
    headers: { Accept: 'application/json' },
    body: new FormData(form),
  })
  const result = await res.json()
  if (result.success) form.replaceWith('Thanks! We got your message.')
  else alert(result.error.message)
})

More in AJAX and JSON.

Where next