Home › Forums › Feature Requests › Flexible Content : Confirmation before deleting the layout › Reply To: Flexible Content : Confirmation before deleting the layout
I had the same request on a recent client site, and I’m enqueuing a script into the admin area to generate a confirmation message when trying to delete a layout.
;(function($) {
acf.add_action('ready', function(){
$('body').on('click', '.acf-flexible-content [data-event=remove-layout]', function( e ){
return confirm("Delete row?");
});
});
}(jQuery));
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.