Class AmpForm

AmpForm class

The amp-form extension allows you to create forms to submit input fields in an AMP document.

public class AmpForm : AmpComponent

Constructors

NameDescription
AmpForm()The default constructor.

Properties

NameDescription
Action { get; set; }Specifies a server endpoint to handle the form input. The value must be an https URL (absolute or relative) and must not be a link to a CDN
ActionXhr { get; set; }Specifies a server endpoint to handle the form input and submit the form via XMLHttpRequest (XHR).
Attributes { get; }AMP provides a set of common attributes that are extended to many AMP components.
Fallback { get; set; }A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
Fieldset { get; }List of fields.
Method { get; set; }The method attribute tells the server about the request method.
Placeholder { get; set; }The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.
override RequiredScript { get; }Required script that muct be added to head section.
Target { get; set; }Indicates where to display the form response after submitting the form.The value must be _blank or _top.

Methods

NameDescription
override ToAmpHtml()Represents amp html version of component.
override ToHtml()Represents html version of component.

See Also