# Trigger Submit Button of the Other Form

> The following is a solution to submit one form at the same time as another. If you hit the submit button of form A, form B will also be submitted.

Source: https://tadabase.com/docs/snippets/trigger-submit-button-of-the-other-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.

![Screenshot for “Trigger Submit Button of the Other Form”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/2022-09-28-16-23-05.gif)

The following is a solution to submit one form at the same time as another. If you hit the submit button of form A, form B will also be submitted.

**Step 1**

**You’ll need to add a CSS class for the second form (the one you want to submit automatically).**

![Screenshot for “Trigger Submit Button of the Other Form”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664395398720.png)

**Step 2**

**Add the following code to the JavaScript tab of your page.**

```
TB.render('component_X',function(data){
    data.ele.find('.af-form-submit').on('click',function(){
        $($('.form-2 .af-form-submit')[0]).click();
    });
});
```

![Screenshot for “Trigger Submit Button of the Other Form”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664396431754.png)

> **Note:** Remember to change “component_X” to the first forms ID.

**Step 3**

**To get the form ID, hover over the info icon symbol at the top of the component.**

![Screenshot for “Trigger Submit Button of the Other Form”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664396271947.png)

**Original Community Post:**

[Trigger submit button of the other form - Community Discussions / How Do I - Tadabase Community](https://community.tadabase.io/t/trigger-submit-button-of-the-other-form/881)
