Home › Forums › Front-end Issues › Disable acf_form() navigate away warning › Reply To: Disable acf_form() navigate away warning
Hi Jess –
Not sure I 100% follow – is there an acf_form() on the page. I believe the acf javascript obj gets loaded with the header scripts. <?php acf_form_head(); ?>
It wouldn’t be hard to just write some jquery/javascript to basically change a var if the user changes a field, and throw a warning like this.
window.onbeforeunload = function(){
if (change) {
return 'Are you sure you want to leave?';
}
};
See: http://stackoverflow.com/questions/7080269/javascript-before-leaving-the-page
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.