Open the sidebar end-user app on page load and on-click of the Submit button

Hi all,

We have built an end-user app for a customer where the app is hosted in the sidebar location. We can see that the app is not opened by default but requires the end-user to click in order to open.

Is there a way to open the app on page load and on click of the “Submit” button?

Kind regards,
Sona S

I don’t think it’s possible to do it directly using the App SDK currently, but by modifying the portal page on which you put the application you could add a script like this:

document.addEventListener('DOMContentLoaded', function () {
  function handleClickOnDiv() {
    const triggerDiv = document.querySelector('.app-wrapper__trigger')
    if (triggerDiv) {
      // Disconnect the observer once the element is found and clicked

  // Setting up the MutationObserver
  const observer = new MutationObserver(handleClickOnDiv)

  // Start observing the document with the configured parameters
  observer.observe(document.body, { childList: true, subtree: true })

  // Call the function once initially in case the element is already present

This automates the click on the application.

For the second point, you could also intercept the click on submit event and bring up a confirmation dialog box that warns the user of the presence of the app.

I understand that this is merely a workaround, but I hope it proves helpful.

1 Like

Hi @Mattia_Piparo,

Thank you for this detailed workaround. We will try this out.

CC: @Ranjith_Rajendran