How to show a warning to the user before deleting data?

Hi, How to show a warning to the user before deleting data? In case he click by mistake
Something like " Are you sure you want to delete this entry? Y/N

Thanks in advance

1 Like

Hi @zakaria.houssam

Create a Pop Up, this pop up contains warning message and Y/N buttons.

When click “delete button” > display data (which data you want to delete) on pop up > show pop up.

No Button : Hide Pop up
Yes Button : Delete “Pop Up’s data” > Hide Pop up

1 Like

Thanks for the reply, still struggling to find how to make the No/Yes buttons though :frowning:

So the yes/no are simply button elements (though can be groups or other elements, but best stick to buttons here). Then for each of the 2 buttons in the popup you have a No and Yes button, each has its own workflow:

image
The No just hides the popup and goes back to the main page


The Yes would delete the thing…I am not sure what data you are deleting but you would need to enter the thing in the dynamic data. If you are removing something from a list of things, then use the ‘Make changes to thing’ and then the remove function within the workflow. Lastly you’d want to hide the popup to return the user to the main page…

Hope this makes sense.

Best,
Luke

2 Likes

Thank you thank you, very helpful, exactly what I was looking for :slight_smile:

Thanks again, I’m trying to do the last thing you mentionned : remove an element from a list. I tried to follow your guidlines but I got stuck (I hope I’m not bothering you too much kind sir):

I added a button “Yes” to the popup and added the element “make a change to a thing” to it’s workflow but I can’t seem to link it to the element of the list.

I appreciate any help, thanks

Happy to help.

It sounds like you want to delete a thing from a list - is this right? If so you can just use the ‘Delete a thing’ as it will then remove the item from the list in the process.

There is a few ways to link the element to the list. As the ‘Yes’ button to confirm the deletion is not in the repeating group you will have to link to the popup in order for the workflow to know what data needs deleting.

The best way would be to use a custom state on the page, so when the ‘Delete’ button in the repeating group is selected, it will add it to a custom state thing for the page as a workflow event. Then on the ‘Yes’ button you can select the thing to delete being the page’s thing.

Hope this makes sense, not sure if you’ve used custom states before?

2 Likes

Thanks man, I have not used custom states before, I will try to look into them to understand :slight_smile: