Submit form redirect to page exits iframe

On an emebdded app, I have a home page with a list view. That list has the “Show detail page option enabled”, selecting “same tab” as the option. This work fine. On the details page, I have a form, and that form is set up to redirect me to the home page. This doesn’t work : the user is redirected in “full screen mode” towards to softr site, not inside the original iframe where the site lives.

I’ve tried playing around with custom code and the form submit event but to no avail. Does anyone have any idea on how to proceed ?

Apprently I was thinking too complicated. It works using the most basic custom code :man_shrugging:

document.addEventListener('DOMContentLoaded', (event) => {
  window.addEventListener('submit-form-success-form1', (e) => {
    window.location.href = "https://appname.softr.app";
  });
});