Ask for Confirmation
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Forms 2.0
Stops a button's actions and asks the user to confirm in a dialog in the middle of the page. If the user confirms, the actions run again from the start and continue past this one. If the user cancels, nothing else runs.
This action is only available in the actions of a Forms 2.0 button (its On Click Handler).
Typical Use Cases
- Ask "Are you sure?" before deleting a record
- Confirm before submitting an order, showing the total from a field, for example
Place an order of [Total]? - Warn before an action that can't be undone, such as sending an email to every customer
Don't use it to
- Show a message without a choice. Use Display Message instead.
- Ask a question in On Preinit, On Page Load or After Fields Initialization. It's not available there, because no button was clicked.
- Collect a value from the user. The dialog only offers confirm and cancel. Add a field to the form instead.
Related Actions
| Action Name | Description |
|---|---|
| Display Message | Shows a message and ends execution. |
| Refresh Field Data | Changes field values on the form, for example after the confirmed actions ran. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Confirmation Title | The dialog title. Can contain HTML. | Yes | Confirmation | No |
| Confirmation Message | The text of the dialog. Can contain HTML, for example Delete <strong>[Name]</strong>? | Yes | Are you sure you want to do this? | No |
| Title for OK Button | The text of the confirm button. | Yes | Yes | No |
| Title for Cancel Button | The text of the cancel button. | Yes | No | No |
| Css Class | One or more CSS class names, separated by spaces, added to the dialog element. | Yes | empty | No |
The default texts are translated into the user's language where a translation exists.
How it works
- The user clicks the button. The form is submitted and the button's actions run on the server.
- When Ask for Confirmation is reached, the actions stop and the dialog opens in the browser.
- If the user confirms, the browser submits the form again. All the actions run again from the start. This time the question counts as answered, so the actions continue past it.
- If the user cancels, nothing else runs. The actions that already ran are not undone.
So one click can run the actions several times: once, plus once for every question the user answers with yes.
| Actions | How often they run |
|---|---|
| Before the first Ask for Confirmation | Once, plus once more for every confirmation |
| Between two Ask for Confirmation actions | Once for every confirmation before them |
| After the last Ask for Confirmation | Once, after the user confirmed every question |
Considerations
- Put it first. The actions before it run again after every confirmation. Put it before any action that saves data, sends an email or calls an API, or that action runs twice.
- Cancel doesn't undo anything. Only the actions before the question have run. If they changed data, that change stays.
- Validation runs again. Every confirmation submits the form again, so the button's Validation Scope is checked again.
- Several questions. You can add more than one. Each is asked in turn, and the user must confirm each to reach the actions after the last one.
- In a loop. A question inside Execute Actions for each List Entry is asked once, not once per entry.
- HTML is cleaned. Scripts and other harmful markup are removed from the title and message.
- Only on buttons. Used anywhere else, the action fails with
Ask for Confirmation only works in the actions of a form button. - Conditions. To ask only in some cases, give it a condition, for example
[Total] > 1000. See Common Parameters.
Examples
To understand how to use the below examples, please see Running Examples.
1. Confirm before deleting a record
Put this action first in a Delete button's On Click Handler, before the action that deletes the record. The record is only deleted after the user clicks Delete.
{
"Title": "Ask for Confirmation",
"ActionType": "AskForConfirmation",
"Description": "Confirm before deleting the customer",
"Parameters": {
"ConfirmationTitle": "Delete customer",
"ConfirmationMessage": "Delete <strong>[Name]</strong>? This can't be undone.",
"ConfirmationOk": "Delete",
"ConfirmationCancel": "Keep"
}
}
Revised 11/18/2026