Under Review

App Wide Modal

Hi Team,

There are times that we need to pop up some sort of modal on the view.  To capture minimum data or display messages.  

I am not sure if this is something that's available or not.  If not can we have that on future releases please?

Thanks

  • Hi,

    Have you tried using the dialog API? There are a number of methods that display modals: dialog.showAlert, dialog.showConfirm, dialog.showPrompt. The latter can be used to collect a text input from a user.

    Here is an example of how to use the confirmation dialog:

    const dialog = require('%app.core%/dialog');dialog.showConfirm('Do you really want to proceed?', {    callback: function(index) {       if (index === 2) {          // User clicked OK       }    }});

    Check out JavaScript API documentation for the full details.

    - Greg