# Add data table in an email

**URL:** <https://community.hubspot.com/t/add-data-table-in-an-email/83405>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [June 14, 2023, 3:44pm UTC](https://community.hubspot.com/t/add-data-table-in-an-email/83405 "2023-06-14T15:44:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJacobs4](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AJacobs4](https://community.hubspot.com/u/AJacobs4)\
**Post date:** [June 14, 2023, 3:44pm UTC](https://community.hubspot.com/t/add-data-table-in-an-email/83405/1 "2023-06-14T15:44:08Z")

</div>

My company provides quotes to customers. Some quotes may have 20 items, some may have just one. What are your recommendations for creating a module that will display the quote information? We’re currently using Smart Content in a single rich text module and personalization tokens, but that doesn’t seem to format well and all the variations cause the emails to be too big. I created a great table module, but the javascript to hide empty rows isn’t working for an email. Any advice?

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [June 14, 2023, 5:52pm UTC](https://community.hubspot.com/t/add-data-table-in-an-email/83405/2 "2023-06-14T17:52:38Z")

</div>

Hey @AJacobs4 ,

Email clients do not support JavaScript or any client-side scripting due to it being a security risk. The display issues using the Rich Text are likely because it tends to wipe certain elements added to it. If you’re using personalization tokens I would create a custom module and use HubL (server-side scripting) to determine what cells are shown.

I don’t know what you’re current setup is so here’s just a very very simple example:

```lia-code-sample
<table style="width: 100%">
 <tr>
 {% if contact.property %}
 <td>{{ contact.property }}</td>
 {% endif %}
 </tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![AJacobs4](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AJacobs4](https://community.hubspot.com/u/AJacobs4)\
**Post date:** [June 16, 2023, 2:39pm UTC](https://community.hubspot.com/t/add-data-table-in-an-email/83405/3 "2023-06-16T14:39:16Z")

</div>

It worked! Thank you!
