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,
It’s a clean, built-in component in WeWeb that’s perfect for confirmation modals.
Here’s how to implement it:
Add a Popup element to your page
Configure it with your confirmation message, Cancel button, and Confirm button
Trigger it from your form using a workflow when the user tries to submit
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.).
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.