Talk2Nit
Talk2Nit

Reputation: 1135

How can I show loader when I click on submit button in AMP form?

I have AMP form which passes the data to another page(eg. xyz.php). But xyz.php took 5 sec to submit the form. Rather than showing form, how can I show loader on AMP forms?

Upvotes: 0

Views: 454

Answers (1)

Craig Scott
Craig Scott

Reputation: 902

If you're making use of the amp-mustache templates you can use with amp-forms to display a success or error message, there is one called submitting. This pops up once the user hits submit and remains until a submit-success or submit-error is rendered.

<div submitting>
  <template type="amp-mustache">
    MESSAGE OR LOADING GIF HERE
  </template>
</div>

Upvotes: 3

Related Questions