X
    Categories: GoogleMobileSEO

AMP Adds Support for AMP Forms via amp-form Extension

One of the most requested features for AMP is the ability to add forms in order to capture leads, subscriptions, polls or other information from site visitors.  The AMP Project has now launched support for forms.

Forms can be added via “amp-form”.

Regular navigation and XHR (XMLHttpRequest, aka Ajax) form submissions are both supported, but consult the documentation for more details on implementation requirements. In addition, amp-form exposes several features to improve the experience of filling in forms:

  • Use the “on” attribute to change the page when the form is submitted, or to change the page depending on whether the form was submitted successfully or with errors.
  • Annotate fields upon submission by using templated response rendering. Use this feature to give contextual feedback on what’s wrong with field input.
  • Style fields based on validation status using CSS pseudo-classes to provide users with real-time feedback on whether their input is valid.

They plan to add addition features for forms and are looking for feedback on what form features publishers would like to see added.  They have also added some experimental features, including custom validation via “amp-form-custom-validations”.

I wouldn’t be surprised if we see some of the popular newsletter and other form services offer plugin support or plugin updates to make it easy for publishers to add amp-forms, for those publishers who are not as experienced implementing custom AMP features.

To get started, AMP By Example shows the various example amp-form implementations with demos.

The following two tabs change content below.

Jennifer Slegg

Founder & Editor at The SEM Post
Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.
Jennifer Slegg :Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.