Snippets Feedback

Bootstrap 5 Multi-Step Feedback Form Wizard

A three-step feedback wizard with a progress indicator, terms agreement, a rating and comment step with inline validation, and a thank-you confirmation. Built with Bootstrap 5 form components and a small vanilla script.

Bootstrap 5 No jQuery Jun 2020 3.7K views

<section class="wdw-stage">
  <div class="container" style="max-width:640px">
    <form class="wdw-card overflow-hidden fb-wizard" novalidate aria-labelledby="fb-title">
      <div class="wdw-aurora text-center px-4 py-4 py-md-5">
        <span class="wdw-eyebrow text-white opacity-75">Feedback</span>
        <h1 id="fb-title" class="wdw-heading h3 text-white mt-1 mb-0">Tell us how we did</h1>
      </div>
      <div class="p-4 p-md-5">

      <ol class="fb-steps list-unstyled d-flex mt-1 mb-4" aria-label="Progress">
        <li class="fb-step active" data-step="0"><span class="fb-dot"><span class="fb-num">1</span><svg class="fb-tick" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span><span class="fb-label">Terms</span></li>
        <li class="fb-step" data-step="1"><span class="fb-dot"><span class="fb-num">2</span><svg class="fb-tick" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span><span class="fb-label">Feedback</span></li>
        <li class="fb-step" data-step="2"><span class="fb-dot"><span class="fb-num">3</span><svg class="fb-tick" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span><span class="fb-label">Done</span></li>
      </ol>

      <div class="fb-panel" data-panel="0">
        <h2 class="h5 fw-bold mb-3">Before you start</h2>
        <ul class="list-unstyled d-grid gap-3 mb-4">
          <li class="d-flex gap-3 align-items-center"><span class="wdw-icon"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 2 4 5v6c0 5 3.4 9.3 8 11 4.6-1.7 8-6 8-11V5l-8-3Z"/><path d="m9 12 2 2 4-4"/></svg></span><div><div class="fw-semibold">Anonymous by default</div><div class="wdw-muted small">Your answers stay private unless you add an email.</div></div></li>
          <li class="d-flex gap-3 align-items-center"><span class="wdw-icon"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 6h16v10H8l-4 4V6Z"/></svg></span><div><div class="fw-semibold">Every response is read</div><div class="wdw-muted small">We reply to feedback, usually within two days.</div></div></li>
          <li class="d-flex gap-3 align-items-center"><span class="wdw-icon"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg></span><div><div class="fw-semibold">Takes about a minute</div><div class="wdw-muted small">Three short steps and you are done.</div></div></li>
        </ul>
        <div class="form-check bg-body-tertiary rounded-3 p-3 ps-5 border">
          <input class="form-check-input" type="checkbox" id="fb-agree" required>
          <label class="form-check-label" for="fb-agree">I agree to the terms and conditions</label>
          <div class="invalid-feedback">Please accept the terms to continue.</div>
        </div>
      </div>

      <div class="fb-panel d-none" data-panel="1">
        <div class="row g-3">
          <div class="col-sm-6">
            <div class="form-floating">
              <input type="text" class="form-control" id="fb-name" placeholder="Name" required>
              <label for="fb-name">Name</label>
              <div class="invalid-feedback">Enter your name.</div>
            </div>
          </div>
          <div class="col-sm-6">
            <div class="form-floating">
              <input type="email" class="form-control" id="fb-email" placeholder="Email" required>
              <label for="fb-email">Email</label>
              <div class="invalid-feedback">Enter a valid email.</div>
            </div>
          </div>
          <div class="col-12">
            <fieldset>
              <legend class="form-label fs-6 fw-semibold">Overall experience</legend>
              <div class="fb-stars d-inline-flex flex-row-reverse gap-1" role="radiogroup"><input type="radio" class="btn-check" name="fb-rate" id="r5" value="5" required><label class="fb-star" for="r5" title="Excellent"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3Z"/></svg><span class="visually-hidden">5 out of 5, Excellent</span></label><input type="radio" class="btn-check" name="fb-rate" id="r4" value="4"><label class="fb-star" for="r4" title="Good"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3Z"/></svg><span class="visually-hidden">4 out of 5, Good</span></label><input type="radio" class="btn-check" name="fb-rate" id="r3" value="3"><label class="fb-star" for="r3" title="Okay"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3Z"/></svg><span class="visually-hidden">3 out of 5, Okay</span></label><input type="radio" class="btn-check" name="fb-rate" id="r2" value="2"><label class="fb-star" for="r2" title="Poor"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3Z"/></svg><span class="visually-hidden">2 out of 5, Poor</span></label><input type="radio" class="btn-check" name="fb-rate" id="r1" value="1"><label class="fb-star" for="r1" title="Terrible"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3Z"/></svg><span class="visually-hidden">1 out of 5, Terrible</span></label></div>
              <div class="text-danger small mt-2 d-none" id="fb-rate-err">Pick a rating.</div>
            </fieldset>
          </div>
          <div class="col-12">
            <div class="form-floating">
              <textarea class="form-control fb-text" id="fb-comment" placeholder="Comments" required></textarea>
              <label for="fb-comment">What could we improve?</label>
              <div class="invalid-feedback">Tell us a little more.</div>
            </div>
          </div>
        </div>
      </div>

      <div class="fb-panel d-none text-center py-3" data-panel="2" tabindex="-1">
        <span class="fb-check mb-3" aria-hidden="true"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></span>
        <h2 class="h4 fw-bold">Thank you!</h2>
        <p class="wdw-muted mb-0">Your feedback has been sent. We appreciate you taking the time.</p>
      </div>

      <div class="d-flex justify-content-between gap-2 mt-4">
        <button type="button" class="btn btn-outline-primary rounded-pill px-4 invisible" data-prev>Back</button>
        <button type="button" class="btn btn-primary rounded-pill px-4" data-next>Start</button>
      </div>
      </div>
    </form>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.