Hi,
Why is there no navigation warning after deleting a field?
I get a warning when I ADD a field and trying to navigate from the field group, but not after deleting one or multiple fields.
ACF Version 5.3.10
Hi @niclasu
You can fix it by using this code in your functions.php file:
function my_acf_field_group_admin_head() {
?>
<script type="text/javascript">
(function($){
acf.add_action('remove', function( $el ){
window.onbeforeunload = function() {
return true;
}
});
})(jQuery);
</script>
<?php
}
add_action('acf/field_group/admin_head', 'my_acf_field_group_admin_head');
I hope this helps 🙂