DMXzone Database Updater ASP Support Product Page

Answered

How to confirm before submitting?

11 years ago 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:
www.dmxzone.com/go/16/popup-confirm-message/

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).

Replies

Replied 11 years ago
11 years ago 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>
	<div id="#control">[DELETE BUTTON]</div>
    <div id="#confirm">[YES] [NO]</div>
</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 11 years ago
11 years ago 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 11 years ago
11 years ago Teodor Kuduschiev replied:
Hello Steve,
I will discuss this option with the dev team.
Replied 11 years ago
11 years ago Steve Skinner replied:
Cool! That would certainly be a nice option to have when dealing with database inserts/edits/deletions.
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
The other option, if you are using Bootstrap 3 is to put such a dropdown button in your content: www.dmxzone.com/go/22609/add-contextual-dropdowns-to-your-content with two options - Yes (executor applied) and No (executor abort)
Replied 11 years ago
11 years ago Steve Skinner replied:
Thanks. In this case it's not a new build and the site was not built on bootstrap 3
Replied 9 years ago
9 years ago 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