Skip to content
Lazyform
All templates

Contact form

Name, email and message. The form every website needs, ready in one paste.

Get the code

Get in touch

We usually reply within a day.

The code

Uses Tailwind CSS classes. Replace YOUR_ACCESS_KEY with your form's key.

contact.html
<form action="https://lazyform-api.xvelopers.com/submit" method="POST" class="mx-auto w-full max-w-lg space-y-5 rounded-2xl border border-gray-200 bg-white p-8 shadow-sm">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <input type="hidden" name="subject" value="New message from the contact form">
  <input type="checkbox" name="botcheck" class="hidden" style="display:none" tabindex="-1" autocomplete="off">

  <div>
    <h2 class="text-2xl font-semibold text-gray-900">Get in touch</h2>
    <p class="mt-1 text-sm text-gray-600">We usually reply within a day.</p>
  </div>

  <div class="grid gap-5 sm:grid-cols-2">
    <label class="block">
      <span class="text-sm font-medium text-gray-700">Name</span>
      <input type="text" name="name" required autocomplete="name" class="mt-1.5 block w-full rounded-lg border border-gray-300 px-3 py-2.5 text-gray-900 outline-none focus:border-gray-900 focus:ring-2 focus:ring-gray-900/10">
    </label>
    <label class="block">
      <span class="text-sm font-medium text-gray-700">Email</span>
      <input type="email" name="email" required autocomplete="email" class="mt-1.5 block w-full rounded-lg border border-gray-300 px-3 py-2.5 text-gray-900 outline-none focus:border-gray-900 focus:ring-2 focus:ring-gray-900/10">
    </label>
  </div>

  <label class="block">
    <span class="text-sm font-medium text-gray-700">Message</span>
    <textarea name="message" rows="5" required class="mt-1.5 block w-full rounded-lg border border-gray-300 px-3 py-2.5 text-gray-900 outline-none focus:border-gray-900 focus:ring-2 focus:ring-gray-900/10"></textarea>
  </label>

  <button type="submit" class="w-full rounded-lg bg-gray-900 px-4 py-3 font-medium text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2">
    Send message
  </button>
</form>