DMXzone Database Updater ASP Support Product Page


How to confirm before submitting?

Asked 03 Jun 2014 17:22:41
have this question
03 Jun 2014 17:22:41 Steve Skinner posted:
Before deleting records, I like to throw up a popup confirmation asking "are you sure" which prevents them from deleting content with an accidental single-click.

I downloaded the Popup confirmation message that you have on your site which is commonly used for this but it does not work with the Updater extension. The popup confirmation message works, but it deletes the record even if you click the cancel button on the popup confirmation. The popup confirmation extension I'm referring to is this one:

I'd like to know what the best way is to confirm an action before doing it with the Updater extension, allowing users to cancel the action if needed (as would be the case in accidentally clicking it).


Replied 04 Jun 2014 12:16:09
04 Jun 2014 12:16:09 Teodor Kuduschiev replied:
Hello Steve,
Unfortunately the delete behavior does not have a built-in confirmation option. The extension you are referring to is not compatible with the database updater.
The best way i can think of is:
1. Create two buttons [YES] and [NO] and put them inside a div with any id.. for example - #confirm. Attach the Delete Executor behavior to the YES button. Using CSS apply display:none to the #confirm.
2. Create another div with an id for example - #control and put a button [DELETE] inside it.
3. Place both the hidden #confirm and the visible #control divs inside the same parent container. Sample structure:
	<div id="#control">[DELETE BUTTON]</div>
    <div id="#confirm">[YES] [NO]</div>

4. Apply a Change Property behavior to the [DELETE] button. On click
- Change the #control display to none
- Change the #confirm display to block
5. Apply a Change Property behavior to the [NO] button. On click
- Change the #confirm display to none
- Change the #control display to block

Replied 04 Jun 2014 14:49:24
04 Jun 2014 14:49:24 Steve Skinner replied:
That's certainly the long way around to accomplish something that used to be simple, but it sounds like the only choice. Thanks for the tip though! I'll have to bookmark this thread, as I'll definitely need to reference this page again in the future when this issue comes up again.

Will you consider a confirmation dialog option for the delete behavior in the future?
Replied 04 Jun 2014 14:58:26
04 Jun 2014 14:58:26 Teodor Kuduschiev replied:
Hello Steve,
I will discuss this option with the dev team.
Replied 04 Jun 2014 15:05:02
04 Jun 2014 15:05:02 Steve Skinner replied:
Cool! That would certainly be a nice option to have when dealing with database inserts/edits/deletions.
Replied 04 Jun 2014 15:46:36
04 Jun 2014 15:46:36 Teodor Kuduschiev replied:
The other option, if you are using Bootstrap 3 is to put such a dropdown button in your content: with two options - Yes (executor applied) and No (executor abort)
Replied 04 Jun 2014 17:11:06
04 Jun 2014 17:11:06 Steve Skinner replied:
Thanks. In this case it's not a new build and the site was not built on bootstrap 3
Replied 11 Jul 2015 12:19:18
11 Jul 2015 12:19:18 Greta Garberini replied:
The bootstrap version is not satisfactory either. The confirm message should come up AFTER the Delete button has been hit. The video sample shows how to create a simple dropdown menu with choices. I am not sure if I understand what it has to do with the original question.
Would the Advanced Layer Popup Extension be of any use ?
BTW: The Popup Confirm Message in its version 1.1.3 cannot be installed at all with the new DMX Extension Manager. If I do it manually I get a simple alert box without choices.

Reply to this topic