Open modal from a workflow?

I have a workflow that takes some time to execute
I want to show a modal popup while processing is going on and then close the modal when the process is completed.

How can I trigger opening a modal from a workflow ?
(Also close later)

1 Like

Nvm. Found it myself.

Create a boolean variable that controls modal
Change value of that variable inside workflow

4 Likes

To confirm for others as this tripped me up and Iā€™ve been using WeWeb for over a year.

Thereā€™s new Dialog Elements that work differently.

Docs:

Which are now controlled via their own actions and not variables like below.

Although I was able to access it like below which is confusing as itā€™s not showing up as a variable apart from here and I didnā€™t set it.

I think this might be a bug because I did have 2 dialogs and I deleted 1 but still have 2 variables showing up, but 1 component action and nothing in the usual variables list. Odd.

Unfortuntely with new Dialog you have to reload the whole editor pretty often as you will see variables from deleted dialogs, variables from copied dialogs which you cannot bind etc. etc. As for now it is still better to use old modals. In your case after reloading the editor the old modal will disappear.

Thanks for sharing this. I was struggling a lot with new Dialog.
I faced exact same issue. This is cleary bug so we should not use New dialog

Agreed. the new dialog seems very buggy to me. I want to conditionally show the dialog via a variable, and when I set ā€œtoggleā€ to OFF and try to use conditional formatting, the dialog does not show even though my variable is true. Also, ā€œPrevent scrollingā€ doesnā€™t work. VERY FRUSTRATING. @Joyce @flo @Raphael I strongly recommend that you create a video showing the usage of the new dialog in various use cases. Youā€™ve added a lot of functionality, and Iā€™ve read your documentation several times, but for me itā€™s not sufficient to help me understand how to use the element.

I also still cannot use the dialog very well. It seems very confusing and got a lot of bugs

You are not supposed to use the new dialog with a variable. You manage the state by using Component Actions. Will take a look at the other bugs reported and get back

A video is coming on how to use it

2 Likes

Hey everyone, here is the updated documentation: Dialog | WeWeb Documentation
Weā€™ll add a video to that documentation soon.

Here is a quick tutorial on how to control the new Modal component in weweb