openModal( )


Opens a dashboard modal extension.

This function can only be used in page code files for dashboard pages created in the Wix editor or with Wix Blocks.

The openModal() function returns an object with a property called modalClosed. This property is a promise that resolves to the data passed to closeModal() when the modal is closed.

Note: Before you use this function, you need a dashboard modal extension. Learn more about implementing dashboard modal extensions.

Method Declaration
Copy
Method Parameters
modalIdstringRequired

ID of the dashboard modal extension to open.


modalParamsModalParams

Custom data to pass into the extension. The extension can access this data using observeState().

Returns
Return Type:OpenModalReturn
Did this help?