Select to view content in your preferred language

WAB Delete Confirmation

2406
2
02-09-2016 05:12 PM
HamishKingsbury1
Deactivated User

Hi All

I would like to add a confirmation dialog box to appear when a user clicks either the:

  • delete button from the feature popup or
  • delete icon from the editor widget

I've had a look at the JS api hoping their might have been an event but haven't made any progress.

Has anyone implemented a confirmation?

Cheers

Hamish

0 Kudos
2 Replies
NNDCDNNDCD
Deactivated User

This should be built in functionality. Why is this not built in and why is it so difficult to implement? I can't find the click event to intercept to add my own confirm dialog. Has anybody been successful in doing this?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

All,

   The issue is that there is not just some event that you can listen for in the JS API so it becomes pretty difficult to listen for a feature delete. Adding a event listener to the popup would not be that difficult but the delete button on the edit toolbar in the edit widget is a whole other situation. If you could just hit the delete key on the keyboard (by accident) then I would see the real need for a confirmation dialog but the fact that a user has to click on the delete button should mean that the user does want to delete the feature and a confirmation would just add a additional nuance step (in my opinion).