Contact form for Astro and Eleventy sites: build it first, sign up later

If your Astro or Eleventy form seems to submit but nothing arrives, see why a static form sends nothing and three ways to fix it.

Build a contact form for your Astro or Eleventy site and see its HTML code before you give anyone your email address. No account is needed to build it.

  1. Build the form. Open the free contact form generator at lamofel.com/tools, tick the fields you want and watch the code change under the form. Nothing is sent anywhere until you press the button. The code below is the kind of form the generator gives you for name, email and message; you can change the button text. The result is plain HTML that works without JavaScript.
  2. Put the HTML in your site. In Astro, an .astro file in src/pages becomes a page at the path of the file, and plain HTML below the --- code fence is rendered as written. In Eleventy, save the HTML in a template file in your input folder, for example contact.html; Eleventy writes the finished pages to its output folder. Example (the generator's output for name, email and message fields; the form action ends in the placeholder CLAIM_YOUR_ENDPOINT until you claim an endpoint):
<form action="https://lamofel.com/f/CLAIM_YOUR_ENDPOINT" method="POST">
  <label for="field-name">Name</label>
  <input id="field-name" type="text" name="name" required>
  <label for="field-email">Email</label>
  <input id="field-email" type="email" name="email" required>
  <label for="field-message">Message</label>
  <textarea id="field-message" name="message" rows="5" required></textarea>
  <input type="text" name="_gotcha" tabindex="-1" autocomplete="off" hidden>
  <button type="submit">Send message</button>
</form>

Generate a free form

No card needed. 100 messages a month free.

Keep the hidden _gotcha field as generated: it is the spam trap. A filled-in _gotcha field marks the post as spam.

  1. Send a real test message. The code above still points at the placeholder, so a real test needs your own endpoint. On the generator's result page, enter the email address where messages should arrive and press "Send messages to my email". There is no password. Your account, the form and the live endpoint are created right away, and you get the same HTML with your real endpoint in the form action -- paste that version in place of the placeholder. Delivery starts after you confirm that address from the email Lamofel sends you; the confirmation link works for 7 days. Until then, messages are stored but not emailed.
  2. Build and deploy your site the way you normally do, then send a test message from the live page and check that it arrives in your confirmed inbox.

Using an AI assistant instead

Lamofel can also be connected to some AI assistants, which can then create forms and read what arrives; which assistants and plans work is listed on the Connect page of this site (lamofel.com/connect).

Limits

Generate a free form ยท See plans · Claim a free endpoint