0

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?

Talk2Nit
  • 1,115
  • 3
  • 22
  • 38

1 Answers1

3

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>
Craig Scott
  • 892
  • 4
  • 14
  • 1
    Note that mustache is optional here - if you just want to show a loader, you can put it in the div directly, without the template tag. – fstanis Jun 09 '19 at 11:32