Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Using Wait Close Event ​

The Wait close event feature in WeWeb's popup system is a powerful tool that allows your workflows to pause and wait for a popup to be closed before continuing. This creates more interactive and sequential user experiences where you can gather input from a popup and then act on that input in your original workflow.

Understanding Wait Close Event ​

When you open a popup using the Open popup action in a workflow, you have the option to enable Wait close event:

Wait close option

How it works ​

  1. Your workflow reaches the Open popup action with Wait close event enabled
  2. The popup opens for the user
  3. Your workflow pauses at this point
  4. The user interacts with the popup and eventually closes it
  5. Your workflow resumes after the popup is closed

To see this in the editor:

  1. Select the element that opens the popup (for example, a View button on a product card).
  2. Open the workflow attached to that element.
  3. Select the Open popup action in the workflow.
  4. Turn on Wait close event on the Open popup action.
  5. Notice that any actions after Open popup (such as a Log action) run only after the popup has been closed.

This is different from the default behavior, where the workflow would execute all actions immediately after the trigger.

Returning values from popups ​

One of the most powerful aspects of Wait close event is the ability to return values from the popup back to the original workflow.

Setting up return values ​

In your popup:

  1. Enter edit mode for the popup you want to pass dynamic values on close for.
  2. Select the element you want to act as the trigger for closing the popup.
  3. In the right panel, open the Workflows tab for that element.
  4. Create a workflow on that element.
  5. Add an action to the workflow.
  6. Select the Close this popup instance action.
  7. In the data field of the Close this popup instance action, add the information you want to return to the workflow that opened the popup.

Accessing return values ​

  1. Set up a workflow on an element in your popup that includes the Close this popup instance action and passes data when the popup closes.
  2. Run that close workflow at least once in preview. This makes the return data available to other workflows.
  3. Navigate to the original workflow that opens the popup.
  4. In any actions that run after the Open popup action (with Wait close event enabled), you can access the data returned from the popup.

Common use cases ​

Confirmation dialogs ​

A classic use case is creating a confirmation dialog:

  1. User clicks Delete on a customer record.
  2. A workflow opens a confirmation popup with Wait close event enabled.
  3. The user clicks Delete or Cancel in the popup.
  4. The popup closes with data indicating the choice and the customer to delete.
  5. The original workflow continues and deletes the record only if the returned data says to.

To set up the confirmation popup:

  1. Open the confirmation popup in edit mode to review its setup.
  2. In the Properties section, add the properties the popup needs (for example, a Person To Delete property).
  3. Confirm the popup is ready to receive the record passed in when it opens.