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?
Asked
Active
Viewed 387 times
1 Answers
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
-
1Note 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