m-form

AMP form. Allows you to create forms in an email When saving an email in Ampier, the action attribute will be generated and substituted automatically

When using various fields (input, select, textarea), you can assign special attributes to them. These will help while saving the code in Ampier

- The data-title attribute allows you to set the Title of the field (used when displaying data)

- Setting the value of the data-required attribute to ‘1’ will allow you to specify that the field is required.

Use data-amp-attributes for apply amp-bind states, E.g.:

data-amp-hidden="mystate == 1"

Properties:
Name Type Attributes Default Description
action string <optional>
create Form submission address. If set to ‘create’, the form will be created when the campaign is saved in Ampier
id string <optional>
rand() Specifies the state of the form. Upon successful submission, the state changes to ‘true’, which can be used to hide the form
on string <optional>
submit-success: AMP.setState({formId: true}) AMP event handler. If set or generated automatically, the ID of the m-form element will be substituted for formId
data-title string <optional>
Used to name a form component when saved in Ampier
Example
<m-form action="https://ampier.io/amp/post/123?key=mykey&format=json">
   ...
</m-form>