Multiple modals with Forge UI

Hi all,
Is is possible to have multiple modal-dialogs in a single App with Forge UI?
The use case is:

  1. USer presses the button
  2. The first modal appears
  3. The user confirms (or not)
  4. The app does something
  5. A second modal appears to confirm things were (or were not) executed correctly.

I can’t figure out how to get the second one to appear. I know I can use windows.alert, but it’s less than ideal for what I need.



Hi @MatteoGubelliniSoftC ,

Are you using UI Kit? If so, you should be able to add a second ModalDialog element, and have it conditionally render based on a variable in your state. You would update your state when you’ve finished your async operations in step 4.

1 Like

Hi @mventnor ,
Good idea I’ll test it in the next few days!
Could it work with more than 2 elements?


Hi @MatteoGubelliniSoftC ,

Yes, you can have as many ModalDialogs in your code as you wish, however only one can be shown at a time.


It works perfectly, thanks!