Implement a Dashboard Modal

The Dashboard Modal extension lets you import a modal that you built and are hosting externally into your app. You can manage the modal in your app using the openModal() and closeModal() functions from the dashboard SDK.

Follow the steps in this article and you'll be ready to add a Dashboard Modal into your apps.

Before you begin

Before you integrate your modal into your app:

  • Build and host your modal externally.
  • There are no restrictions on how you build your modal.
  • Have the URL which hosts your modal ready before performing the steps to implement the modal.

Add a Dashboard Modal to your app

  1. In the Wix Dev Center, navigate to My Apps, and then click on your app.

  2. Go to the Extensions page, and click + Create Extension.

  3. Search for Dashboard Modal. Then click + Create.

  4. Populate the JSON editor with your modal's details. This is where you provide the Extension with everything it needs to implement your modal in your app. This includes the URL that hosts your modal, permissions, size, and names. Use the Documentation tab on the right hand side to help you populate your JSON.

    Important: The hosting platform must be "BUSINESS_MANAGER".

    For example:

    Copy
    1
    {
    2
    "hostingPlatform": "BUSINESS_MANAGER",
    3
    "iframeUrl": "https://example.com/modal",
    4
    "title": "Example Modal",
    5
    "width": 600,
    6
    "height": 400,
    7
    "componentName": "My Dashboard Modal"
    8
    }
  5. Now that your modal extension is set up, you can code it in your app using the openModal() and closeModal() SDK functions. You'll need your modal's component ID. You can find the component ID by opening your Dashboard Modal in the Dev Center and checking the URL at the top of your browser.

    For example:

Was this helpful?
Yes
No