Title: Clean-up-form function
Last modified: May 10, 2017

---

# Clean-up-form function

 *  [NPLD](https://wordpress.org/support/users/npld/)
 * (@npld)
 * [9 years ago](https://wordpress.org/support/topic/clean-up-form/)
 * I have a form in a modal box and was wondering if there is a way to clean-up 
   the form when I close the modal box. Now the text entered in the fields (prior
   to submit), the validation errors or the thanks you field is shown when I reopen
   the modal box.
 * As a workaround I now refreshes the page when closing the modal, but that’s not
   an elegant way to do it, so hopefully one of you have a better solution. Thanks
   🙂
    -  This topic was modified 9 years ago by [NPLD](https://wordpress.org/support/users/npld/).

The topic ‘Clean-up-form function’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [NPLD](https://wordpress.org/support/users/npld/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/clean-up-form/)
 * Status: not resolved