Skip to content

Validator: Allowing Forms and Inputs #3348

@mkhatib

Description

@mkhatib

AMP will start supporting forms - see #3343, filing this to get discussion going and to start on the validator part in parallel.

  • Allow usage of form, input, textarea, select, option tags in AMP Docs.
  • Must include amp-form extension script if document uses form/input/select/textarea tags.
  • Must use inputs tags inside form tag.
  • Form must have at least one <input type=submit>
  • Form must have action=”absolute non-cdn https url”
  • Form must have target=”_top|_blank”
  • <input type=”file|password|image|button”> are invalid
    • This might be revised later on.
  • Other than normal form attributes, allowed attributes include:
    • action-xhr - Optional - to enable a submission flow through XHR. Also has same validation as action attr (absolute, non-cdn link and https) except not required.

cc/ @powdercloud @Gregable @rudygalfi

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions