Close Form Popup And Stop Execution
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Forms
Closes the popup of a Form module on the current page, then stops. No further actions run. It's available in forms and listings.
It closes a popup opened by Open Form Popup And Stop Execution, Open Form Popup And Continue Execution, or by a Form whose Display Mode is In Popup. It can run from the form inside the popup, or from anywhere else on the page.
| Action | What happens after the popup closes |
|---|---|
| Close Form Popup And Stop Execution | No further actions run. |
| Close Form Popup And Continue Execution | The popup closes right away and the next actions keep running. |
Typical Use Cases
- Add a "Cancel" button to a form in a popup
- Close the popup as the last step of a submit button, after the data is saved
- Close a form popup from a button on the page behind it
Don't use it to
- Run more actions after the popup closes, such as refreshing a listing. Use Close Form Popup And Continue Execution instead.
- Close a Tabs popup. Use Close Tabs Popup And Stop Execution instead.
- Send values back to the page behind the popup. The action only closes the popup.
Related Actions
| Action Name | Description |
|---|---|
| Close Form Popup And Continue Execution | Closes the same popup and keeps running the next actions. |
| Open Form Popup And Stop Execution | Opens a Form in a popup and ends execution. |
| Open Form Popup And Continue Execution | Opens a Form in a popup and keeps running the next actions. |
| Close Tabs Popup And Stop Execution | Closes a Tabs popup. |
| Refresh Listing | Reloads a listing, for example after the popup form saved a change. |
| Stop Execution | Stops running actions without closing anything. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Select Module | The Form module whose popup to close. It can be the form that runs the action. The list shows the Form modules on the site, as Title (#ModuleId). Click EXPR to enter a module ID, such as 1234, or a token that holds one. The module's unique ID (a GUID) also works. The action fails if it's empty or doesn't match a module. | Yes | empty string | Yes |
What happens when the popup closes
- Only the popup closes. The page behind it isn't refreshed or redirected, and no values are passed back. To update a listing, use Close Form Popup And Continue Execution followed by Refresh Listing.
- The form isn't reset. If the popup is opened again without Reinitialize Form, the user sees the form as it was. Turn on Reinitialize Form in the open action to start with a fresh form.
- Nothing happens if the popup isn't open, or if the Form isn't on the page.
In Listings
Listings also have Close Form Popup, a client-side version of this action. It's only available on buttons with Client Button turned on. It runs in the browser as soon as the button is clicked, without a request to the server.
It has the same Select Module parameter. There's no Stop or Continue. A client button only runs client-side actions, one after another.
Considerations
- Put it last on submit buttons. On a submit button, actions after this one don't run. Save the data first, then close the popup.
- Not in APIs, workflows or User Guides. The action runs JavaScript in the browser, so it's only available in forms and listings.
- Conditions. To close the popup only in some cases, give it a condition, for example
"[Saved]" == "True". See Common Parameters.
Examples
To understand how to use the below examples, please see Running Examples.
1. Add a Cancel button to a popup form
Add this action to a "Cancel" button in the Form module 1234, which is opened in a popup. It closes the popup and nothing else runs, so nothing is saved.
{
"Title": "Close Form Popup And Stop Execution",
"ActionType": "CloseAFPopup",
"Description": "Close the popup without saving",
"Parameters": {
"ModuleId": "1234"
}
}
2. Close the popup after a successful save
Put this action last on the submit button of the popup form. It closes the popup only when an earlier action set the Saved token to True. Otherwise, the popup stays open so the user can fix the data.
{
"Title": "Close Form Popup And Stop Execution",
"ActionType": "CloseAFPopup",
"Description": "Close the popup once the order is saved",
"Condition": "\"[Saved]\" == \"True\"",
"Parameters": {
"ModuleId": "1234"
}
}
Revised 09/27/2026