How to customize confirmation dialog box?

  

From now and then there is this simple request to make a standard confirmation box cross browser with the same look and feel. Well we all know that we can’t customize the default browser confirmation box but we can implement different solutions to achieve this level of customization and each one can follow different directions.

The most basic approach, will be using just OutSystems with the resource of a normal OutSystems popup, where you can build it according to your needs with the advantage of following already the same Application Style Guide. The downsize of this approach is performance and some effort in the implementation since this will add unnecessary round-trips to the server just to handle the user response and on top of that each button/link will have to be changed to trigger first the confirmation popup and then the final action.

Another approach will be to resource a JavaScript solution but even so this may vary in different ways, one possible solution could the using a library, like jQuery.


But why going too far? Forge already have two components for this kind of customization and you can easily change the look and feel just by applying some CSS classes.

Component “Confirmation Dialog” provides a simple drag and drop widget where the button default behavior is replaced to trigger a popup using JavaScript.

Service Studio 

The alternative component “CustomConfirmation” provides a more robust solution, one which already applies to the existing built-in “confirmation” property, just by simply adding a widget under your Layout.

 


I suggest to take a look on both of them and follow the solution which best fits to your needs.

http://www.outsystems.com/forge/component-versions/717/Confirmation+Dialog

https://www.outsystems.com/forge/component-discussions/679/CustomConfirmation

Interesting, thanks for sharing. One remark though: "and on top of that each button/link will have to be changed to trigger first the confirmation popup and then the final action" - depending on what you mean by "changing each button/link", the approach I would take is to use a Popup_Editor_Notify, and handle the screen action you'd normally call (instead of linking to the pop-up) in the OnNotify.

Kilian Hekhuis wrote:

Interesting, thanks for sharing. One remark though: "and on top of that each button/link will have to be changed to trigger first the confirmation popup and then the final action" - depending on what you mean by "changing each button/link", the approach I would take is to use a Popup_Editor_Notify, and handle the screen action you'd normally call (instead of linking to the pop-up) in the OnNotify.

Indeed that would be the most simplistic approach, I was thinking in a context where you can reuse the confirmation dialog box. And I'm not considering a scenario where you need to submit (POST) the screen :)