Hello @joncon62
You can enable the “Post Draft” mode from the particular forms’ settings- 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.
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.
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.
I integrated it into my site. For those interested, get the plugin from Here then put the following code into functions.php of your child theme or use the 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 10 months, 3 weeks ago by
Yui. Reason: formatting
Hi,
Thanks for sharing the workaround in detail @joncon62 !
I hope this will help others as well 🙂
Cheers!