Form with textarea


Search (GET non-xhr same origin)

Search (GET non-xhr cross origin - current host > httpbin.org)

Search (GET non-xhr same origin) Using AMP Bind and Amp Action (on="tap:....")

Search (GET xhr same origin)

Search (GET xhr cross origin current host > httpbin.org)

Search (GET xhr same origin) Using AMP Bind and Amp Action (on="tap:....")

Subscribe to our weekly Newsletter (POST xhr same origin)

Success! Thanks for subscribing! Please make sure to check your email to confirm!
Oops! We apologize, something went wrong. Please try again later.

Subscribe to our weekly Newsletter (xhr POST cross origin - current host > amp.localhost:8000)

Subscribe to our weekly Newsletter (xhr + submit events)

This message will hide when the form is submitted
There are some input that needs fixing. Please fix them.
Everything looks good, you can submit now!
Please hold on while we submit your answer!

NOT ALLOWED (POST non-xhr - submission prevented)

Custom Validations

Show First Validation On Submit

Show All Invalid Messages On Submit

Show All Invalid Messages On Submit (Summary)

  1. Name is a required field. Please fill it out.
  2. Please enter your first and last name separated by a space (e.g. Jane Miller)
  3. We need your email to send you coolness!
  4. That doesn't look like an email. Please fix it.

Show As You Go Messages On Submit

Show As You Go Messages (with all messages on submit)

on=change and form.submit examples

What is your favorite flightless bird?

Using button[type=submit]

amp-selector example

Redirect After POST (works only if running on localhost)

Recursive Event-Action-Event-Action Test - Should only submit once

There are some input that needs fixing. Please fix them.
Everything looks good, you can submit now!
Please hold on while we submit your answer!

Asynchronous verification example

Throw an error?

Debounced search

Using a submit-success template referenced by id

File upload

Way to fail