# Multi-Item Select for Form Input

> Here is a solution if you have a table where you would like to add multiple products from a particular supplier.

Source: https://tadabase.com/docs/snippets/multi-item-select-for-form-input  
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.

**Here is a solution if you have a table where you would like to add multiple products from a particular supplier.**

**Step 1**

**In the Users table, add a connection to the Orders table (or the table where you store the selected products)**

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_16-57-07.png)

**Step 2**

**Add New Order Page, using the JavaScript code below, auto-save it & update the User with the new order, and finally redirect to the Edit Order or Detail page.**

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_17-06-51.png)

**Step 3**

**From the Edit/Detail Order page, add the Products table.**

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_17-15-21.png)

**Step 4**

**In the Products table, add the Edit button; this will show the selected product; using JavaScript, you will autosave with Insert to the connected table, and this will add +1 of the chosen products into the Order from the selected User. And finally, auto closes the page.**

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_17-18-09.png)

**JavaScript Code:**

```
// Auto click of Button “Save & Update” once loaded:
// ***********************************************************************************************
var onLoadEditProject = false;
// alert("Here you are : ");
function forceSubmitEditProject() {
    if (onLoadEditProject === false) {
        if ($(’#x_element_page_106_3.form - submit.af - form - submit’).html() !== undefined) {
            onLoadEditProject = true;
        }
        window.setTimeout(forceSubmitEditProject, 100);
    } else {
        // alert("Here you are : ");
        $(’#x_element_page_106_3.form - submit.af - form - submit’).click();
    }
}

TB.render(‘component_4’, function() {
    forceSubmitEditProject();
});

// End of : Auto click of Button “Save & Update” once loaded:
//***********************************************************************************************
```

> **Note:** Replace x_element_page_10_4 with your page’s element id.

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_16-26-30.png)

> **Note:** Replace component_4 with the component info from the page builder

![Screenshot for “Multi-Item Select for Form Input”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-03_16-31-29.png)

**Original Community Post:**

[https://community.tadabase.io/t/multi-item-select-for-form-input/1107](https://community.tadabase.io/t/multi-item-select-for-form-input/1107)
