# Display Addresses in a Single Line in Table Components

> 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/display-addresses-in-a-single-line-in-table-components  
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 “Display Addresses in a Single Line in Table Components”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-12_14-41-45.png)

This is a great solution that you can use to display addresses in a table component across a single line as opposed to multiple lines by replacing the line break with a comma and a space.

**Step 1**

**In your data table, double click your address field to add the CSS class of "address."**

![Screenshot for “Display Addresses in a Single Line in Table Components”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-12_14-29-29.png)

**Step 2**

**Hover over the info icon of your data table to get the value of your component ID.**

![Screenshot for “Display Addresses in a Single Line in Table Components”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-12_14-34-34.png)

**Step 3**

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

> **Note:** Remember to change the component ID of the code to the value of your ID found in step 2.

```
TB.render('component_3', function(data) {
    var addresses = $(".address a"),
        x;
    for (x of addresses) {
        y = x.innerHTML;
        x.innerHTML = y.replace(/<br>/g, ", ");
    }
});
```

![Screenshot for “Display Addresses in a Single Line in Table Components”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-12_14-37-14.png)

**Original Community Post:**

[Display Addresses in a Single Line in Table Components - Community Discussions / Tips and Tricks - Tadabase Community](https://community.tadabase.io/t/display-addresses-in-a-single-line-in-table-components/1858)
