# 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…

Source: https://tadabase.com/docs/snippets/pause-a-redirect-of-the-form  
Status: Not yet re-checked. Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

> **Warning:** 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 this functionality is through the plugin installation wizard. Learn more about plugins [here](https://tadabase.com/docs).

![Screenshot for “Pause a Redirect of the Form”](https://community.tadabase.io/uploads/default/original/1X/db353965e627f23b0e61488f2344dfbefa4225a8.gif)

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”](https://community.tadabase.io/uploads/default/original/2X/3/38b7ca2719de427de59caac331ef4758159e1397.png)

**Step 2**

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

```
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”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-09_23-24-26.png)

**Step 3**

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

```
.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”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-09_23-28-06.png)

**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](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)
