Title: smalloutside's Replies | WordPress.org

---

# smalloutside

  [  ](https://wordpress.org/support/users/smalloutside/)

 *   [Profile](https://wordpress.org/support/users/smalloutside/)
 *   [Topics Started](https://wordpress.org/support/users/smalloutside/topics/)
 *   [Replies Created](https://wordpress.org/support/users/smalloutside/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/smalloutside/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/smalloutside/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/smalloutside/engagements/)
 *   [Favorites](https://wordpress.org/support/users/smalloutside/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] Close popup and clear form on successful submission](https://wordpress.org/support/topic/close-popup-and-clear-form-on-successful-submission/)
 *  Thread Starter [smalloutside](https://wordpress.org/support/users/smalloutside/)
 * (@smalloutside)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/close-popup-and-clear-form-on-successful-submission/#post-15902484)
 * Thanks [@milindmore22](https://wordpress.org/support/users/milindmore22/) for
   the pointers.
 * We were able to solve this by using the information and ideas from a few other
   places.
 * For anyone facing the same issue, here is what we have done.
 * We have added methods to the amp-form events using the “on” attribute. We attached
   the following methods to the “submit-success” event
    -  Close the lightbox using the .close method on the lightbox
    -  Clear the content of the form using the .clear method on the form
    -  Redirect to a new page using the .navigateTo method on the AMP object
 * Here is the code that we have implemented.
 *     ```
       <form id='contact-form' method="POST" on="submit-success:contact-form-popup.close,simple-contact.clear,AMP.navigateTo(url='/confirmation')">
       ```
   

Viewing 1 replies (of 1 total)