Confirmation popup implementation

Hey everyone

I’m working on a form and in some cases I need to show a confirmation popup (for example when an optional field is empty, to warn the user before submitting).

I’m wondering:

  • Is there a clean / common pattern to implement a confirmation modal in WeWeb?
  • How can I handle the Confirm / Cancel result inside the original form workflow (cleanly without duplicating logic)?

If anyone has feedback or examples, I’d love to hear how you do it,

Thank you,
Hugo

Hi @Hugo-OC :waving_hand: ,

You can use the Popup element for this!

It’s a clean, built-in component in WeWeb that’s perfect for confirmation modals.

Here’s how to implement it:

  1. Add a Popup element to your page
  2. Configure it with your confirmation message, Cancel button, and Confirm button
  3. Trigger it from your form using a workflow when the user tries to submit
  4. Handle the Confirm/Cancel actions with separate workflows

This way you keep everything in the original form workflow without duplicating logic. The Popup handles the confirmation interaction cleanly, and you can bind the actions to whatever you need (submit the form, show validation message, etc.).

Hi Agustin,
Thank you for being so reactive.

I don’t think this fully solves my main issue. For example, on form submission I have a main workflow where I check whether a field is filled.

  • If it is filled, I create the record.
  • If it’s not, I show a confirmation modal.

The problem is that when the user clicks Confirm, I have to handle this in another event, which means creating another workflow to create the record and that leads to duplicated logic.

Is there a way for the initial workflow to wait for the user’s confirmation or cancellation from the modal before continuing?

I’m comfortable with coding, so a JS-based approach would be fine.

Thank you !

Hmm, I think I’m starting to understand what you are trying to achieve.

A pattern you could try is to split your logic in two workflows:

  • On the form “On submit” workflow, you only do the checks:
    • If all required + “important optional” fields are filled → call a reusable workflow like CreateRecordAndRedirect.
    • If some optional fields are empty → open your confirmation popup and stop there (no record created yet).
  • On the popup Confirm button, you call the same CreateRecordAndRedirect workflow. On Cancel, you just close the popup or focus the field.

This way you don’t need the original workflow to “wait” for the popup, and you avoid duplicating all the create-record logic in two places.

Does this make more sense? :thinking:

1 Like

you can use the popups that aren’t elements but from the popup tab and use wait until close.

The docs actualy have your use case in them I belive

2 Likes

Hey Sam,

Thank you, That was exactly what I was looking for !

Great Success Win GIF

2 Likes