Support

Account

Home Forums Feature Requests Flexible Content : Confirmation before deleting the layout Reply To: Flexible Content : Confirmation before deleting the layout

  • @meneldil

    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));