Double Confirmation on delete

QuestionsDouble Confirmation on delete
ITSpecialisst asked 9 years ago

Is there a way to have a double confirmation dialog on delete (I want the user to select a record, then click the delete-button in the toolbar and when clicking on "delete" in the dialog box I want the user to Confirm again "are you REALLY sure to delete this record permanently?")

thanks in advance for this great piece of software and your wonderful support!
kind regards from Germany

Michael

2 Answers
Abu Ghufran answered 9 years ago

You can try following:

$grid["delete_options"]["beforeSubmit"] = "function(){ if (!confirm('Are you really sure?')) { return [false,'Operation cancelled']; } return [true,'']; }";

$g->set_options($grid);

Not a perfect solution but can't find a better alt now.

ITSpecialisst answered 9 years ago

Wow ! Superfast support. I somehow didn't come across the "beforeSubmit" – option in your documentation. Your solution is working flawlessly…

Thanks!

Your Answer

12 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?