Pause a Redirect of the Form

Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

Screenshot for “Pause a Redirect of the Form”

You may want to pause your form's redirect for many reasons. In this instance, a user wanted to pause the redirect while a Make (formerly Integromat) scenario ran. Here we have provided a JavaScript solution to complete this.

Step 1

Find the Component ID of the form you want to delay so we can target that form’s submit button and only that form’s submit button.

Screenshot for “Pause a Redirect of the Form”

Step 2

Add the following JavaScript to the JavaScript tab on the parent page (the page that contains the form), not the details page.

Text
TB.render('component_ID', function(data) {
    data.ele.find('.form-submit button').click(function() {
        $('body').append('<div class="loader"><p>The contract is being generated, please wait2...</p></div>');
        setTimeout(function() {
            location.reload();
        }, 10000);
    });
});
Screenshot for “Pause a Redirect of the Form”

Step 3

Lastly, add the following to the CSS tab on the details page.

Text
.loader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: url('../../../images/spinner-light.gif') 50% 50% no-repeat rgb(249, 249, 249);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader p {
    margin-top: 200px;
}
Screenshot for “Pause a Redirect of the Form”

Original Community Post:

https://community.tadabase.io/t/using-js-to-pause-a-redirect-using-js-to-refresh-a-page-after-an-action-button-is-clicked/101#:~:text=Jun%20%2720-,Hey%20Tim!,-Scenario%201%3A

Was this page helpful?

Something wrong or missing on this page? Tell us.