Skip to main content
Version: 1.28 (Current)

Close Form Popup And Stop Execution

Audience: Low-code Engineers

Skill 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.

ActionWhat happens after the popup closes
Close Form Popup And Stop ExecutionNo further actions run.
Close Form Popup And Continue ExecutionThe 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​

Action NameDescription
Close Form Popup And Continue ExecutionCloses the same popup and keeps running the next actions.
Open Form Popup And Stop ExecutionOpens a Form in a popup and ends execution.
Open Form Popup And Continue ExecutionOpens a Form in a popup and keeps running the next actions.
Close Tabs Popup And Stop ExecutionCloses a Tabs popup.
Refresh ListingReloads a listing, for example after the popup form saved a change.
Stop ExecutionStops running actions without closing anything.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Select ModuleThe 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.Yesempty stringYes

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​

tip

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