Title: Exit without save warning
Last modified: September 24, 2021

---

# Exit without save warning

 *  Resolved [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/)
 * If a user edits a post from the dashboard but exits without saving, how can I
   display a warning there are unsaved changes? At the moment it allows the exit
   and the edits are lost.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14906401)
 * Hello [@joncon62](https://wordpress.org/support/users/joncon62/)
 * You can enable the “Post Draft” mode from the particular forms’ settings- [https://prnt.sc/1th6pc4](https://prnt.sc/1th6pc4).
   And a warning before leaving the page is currently unavailable with the plugin.
   However, I will keep this suggestion as an enhancement request in my notebook.
 * Kind Regards.
 *  Thread Starter [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14906592)
 * Thanks, in the meantime I’m using the jQuery plugin jquery.are-you-sure but I
   don’t think it’s supported anymore. Seems to work though.
 *  [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14909058)
 * Hi,
 * Do you mean an additional WordPress plugin that supports `jquery.are-you-sure`?
   or do you integrate the jquery library jquery.are-you-sure with the WPUF in your
   site?
 * You can share your workaround here which might help others.
    Thanks.
 *  Thread Starter [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14909688)
 * I integrated it into my site. For those interested, get the plugin from [Here](https://github.com/codedance/jquery.AreYouSure)
   then put the following code into functions.php of your child theme or use the
   [code snippets](https://wordpress.org/plugins/code-snippets/) plugin.
 *     ```
       // Check if there are unsaved changes and show warning
       add_action( 'wpuf_before_form_render', 'wpuf_unsaved_changes' );
       function wpuf_unsaved_changes( $form_id ) {
       	?>
       		<script type="text/javascript" src= "path/to/js/jquery.are-you-sure.js"></script>
       		<script>
       		jQuery( document ).ready(function($) {
       			$('form').areYouSure();
       		});
       		</script>
       	<?php
       }
       ```
   
 * Make sure you use the correct
 * > path/to
 *  in the code above. There may be a more elegant solution but this works for me.
    -  This reply was modified 4 years, 8 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: formatting
 *  [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14931346)
 * Hi,
    Thanks for sharing the workaround in detail [@joncon62](https://wordpress.org/support/users/joncon62/)!
 * I hope this will help others as well 🙂
    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Exit without save warning’ is closed to new replies.

 * ![](https://ps.w.org/wp-user-frontend/assets/icon-256x256.gif?rev=2818776)
 * [User Frontend: AI Powered Frontend Posting, User Directory, Profile, Membership & User Registration](https://wordpress.org/plugins/wp-user-frontend/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-user-frontend/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-user-frontend/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-user-frontend/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-user-frontend/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-user-frontend/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/exit-without-save-warning/#post-14931346)
 * Status: resolved