List/Library Control Delete Warning

Hi Plumsail,

I wanted to ask, is it possible to make a pop-up box to appear to ask the user to confirm if they're happy to delete a record from the SharePoint list?

For instance, if I click on the "Delete" button on the List/Library Control Ribbon, I want a pop-up box to appear to make sure they're happy with the choice they're making. Currently, users can easily delete a record from the list without a warning or anything.

Is this something that can be implemented now or added as a future enhancement to your product?



I came across this request which will work great!

How do I implement this into the list/library control?

Dear @DryChips,
After the next update, this functionality should be available out of the box, like in SharePoint Online. For now, you can replace default Delete button with your own, which will first confirm user's intent:

fd.control('SPDataTable1').ready(function() {
  //add new Delete button
  var button = {text: 'Delete',
            class: 'btn-secondary',
            visible: true,
            icon: 'Delete',
            iconType: 0,
            click: function() { if(confirm('Are you sure you want to delete items?')){ 
  fd.control('SPDataTable1').buttons[1].click() }}}

    function(items) {
        //always hide old delete button
        fd.control('SPDataTable1').buttons[1].visible = false;
        //show new delete button if items selected
        fd.control('SPDataTable1').buttons[3].visible = items.length > 0;

1 Like