Skip to content
Lazyform
All templates

Feedback form

A 1 to 5 rating and an open question, with an optional email for replies.

Get the code

How are we doing?

Two minutes of your time helps us a lot.

How likely are you to recommend us?
Not likelyVery likely

The code

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

feedback.html
<form action="https://lazyform-api.xvelopers.com/submit" method="POST" class="mx-auto w-full max-w-lg space-y-6 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 feedback">
  <input type="checkbox" name="botcheck" class="hidden" style="display:none" tabindex="-1" autocomplete="off">

  <div>
    <h2 class="text-2xl font-semibold text-gray-900">How are we doing?</h2>
    <p class="mt-1 text-sm text-gray-600">Two minutes of your time helps us a lot.</p>
  </div>

  <fieldset>
    <legend class="text-sm font-medium text-gray-700">How likely are you to recommend us?</legend>
    <div class="mt-2 grid grid-cols-5 gap-2">
      <label class="cursor-pointer"><input type="radio" name="rating" value="1" required class="peer sr-only"><span class="block rounded-lg border border-gray-300 py-2 text-center text-gray-700 peer-checked:border-gray-900 peer-checked:bg-gray-900 peer-checked:text-white peer-focus-visible:ring-2 peer-focus-visible:ring-gray-900/20">1</span></label>
      <label class="cursor-pointer"><input type="radio" name="rating" value="2" class="peer sr-only"><span class="block rounded-lg border border-gray-300 py-2 text-center text-gray-700 peer-checked:border-gray-900 peer-checked:bg-gray-900 peer-checked:text-white peer-focus-visible:ring-2 peer-focus-visible:ring-gray-900/20">2</span></label>
      <label class="cursor-pointer"><input type="radio" name="rating" value="3" class="peer sr-only"><span class="block rounded-lg border border-gray-300 py-2 text-center text-gray-700 peer-checked:border-gray-900 peer-checked:bg-gray-900 peer-checked:text-white peer-focus-visible:ring-2 peer-focus-visible:ring-gray-900/20">3</span></label>
      <label class="cursor-pointer"><input type="radio" name="rating" value="4" class="peer sr-only"><span class="block rounded-lg border border-gray-300 py-2 text-center text-gray-700 peer-checked:border-gray-900 peer-checked:bg-gray-900 peer-checked:text-white peer-focus-visible:ring-2 peer-focus-visible:ring-gray-900/20">4</span></label>
      <label class="cursor-pointer"><input type="radio" name="rating" value="5" class="peer sr-only"><span class="block rounded-lg border border-gray-300 py-2 text-center text-gray-700 peer-checked:border-gray-900 peer-checked:bg-gray-900 peer-checked:text-white peer-focus-visible:ring-2 peer-focus-visible:ring-gray-900/20">5</span></label>
    </div>
    <div class="mt-1.5 flex justify-between text-xs text-gray-500"><span>Not likely</span><span>Very likely</span></div>
  </fieldset>

  <label class="block">
    <span class="text-sm font-medium text-gray-700">What should we improve?</span>
    <textarea name="feedback" rows="4" 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>

  <label class="block">
    <span class="text-sm font-medium text-gray-700">Email <span class="font-normal text-gray-500">(optional, if you'd like a reply)</span></span>
    <input type="email" name="email" 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>

  <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 feedback
  </button>
</form>