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: