Event registration

Register attendees for an event.

Why these fields

  • Full name: Full name captures a short, searchable answer and is required to complete the request.
  • Email: Email provides a validated reply address and is required to complete the request.
  • Phone: Phone provides a direct callback option but remains optional.
  • Ticket type: Ticket type keeps answers consistent for filtering and routing but remains optional.
  • Dietary requirements: Dietary requirements captures a short, searchable answer but remains optional.

Fields

Full nametextrequiredEmailemailrequiredPhonetelTicket typeselectDietary requirementstext

Preview

Code

<script lang="ts">
  let sent = $state(false);

  async function onSubmit(e: SubmitEvent) {
    e.preventDefault();
    const form = e.target as HTMLFormElement;
    const res = await fetch("https://forms.formward.eu/f/your-form-id", {
      method: "POST",
      headers: { Accept: "application/json" },
      body: new FormData(form),
    });
    if (res.ok) {
      sent = true;
      form.reset();
    }
  }
</script>

{#if sent}
  <p>Thanks! Your message has been sent.</p>
{:else}
  <form onsubmit={onSubmit}>
    <label for="name">Full name</label>
    <input type="text" name="name" id="name" required />
    <label for="email">Email</label>
    <input type="email" name="email" id="email" required />
    <label for="phone">Phone</label>
    <input type="tel" name="phone" id="phone" />
    <label for="ticket">Ticket type</label>
    <select name="ticket" id="ticket">
      <option value="General">General</option>
      <option value="VIP">VIP</option>
      <option value="Student">Student</option>
    </select>
    <label for="dietary">Dietary requirements</label>
    <input type="text" name="dietary" id="dietary" />
    <input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="position:absolute;left:-9999px" aria-hidden="true" />
    <button type="submit">Send</button>
  </form>
{/if}

Customize before publishing

  • Remove fields you do not need and mark only essential answers as required.
  • Replace placeholder wording with terms your audience already understands.
  • Add your privacy notice, retention details and expected response time.
  • Test keyboard focus, validation errors and the confirmation state on mobile.

Use this with Formward

Create a form, copy your endpoint, and replace https://forms.formward.eu/f/your-form-id in the code above.

Event registration template, copy-paste code | Formward