# Module for Email Table with HREF not working with Link or URL Fields

**URL:** <https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000>\
**Category:** CMS Development\
**Tags:** marketing-email\
**Created:** [June 8, 2023, 11:47pm UTC](https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000 "2023-06-08T23:47:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMcLellan](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@MMcLellan](https://community.hubspot.com/u/MMcLellan)\
**Post date:** [June 8, 2023, 11:47pm UTC](https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000/1 "2023-06-08T23:47:54Z")

</div>

Not sure what I’m going wrong, but I’ve got a simple HTML block module to create an event table that I want to drop into an email. I will re-use this with other marketers so wanted to create it as editable using fields. I created the field for the event date, name, and URL, and used those fields in the module but when I check my module preview -- the date and name work, but the href link just gives me an error each time, like its not pullin in the URL from the field I created?

CODE:

\<table role=“presentation” border=“1” style width=“90%” style=“margin-left: auto; margin-right: auto”\>  
\<th style=“width:40%”\>Date of Event\</th\>  
\<th style=“width:50%”\>Event Name/Info\</th\>  
\<tr\>  
\<td style=“padding: 8px”;\>{{ module.event\_1.event\_1\_date }}\</td\>  
\<td style=“padding: 8px”;\>\<a href=“{{ module.event\_1.link\_field }}”\>{{ module.event\_1.event\_1 }}\</a\>\</td\>  
\</tr\>  
\<tr\>  
\<td style=“padding: 8px”;\>Date 2\</td\>  
\<td style=“padding: 8px”;\>Event with Link 2\</td\>  
\</tr\>  
\<td style=“padding: 8px”;\>Date 3\</td\>  
\<td style=“padding: 8px”;\>Event with Link\</td\>  
\</table\>

---

<div class="post-metadata">

**Author:** ![TomM2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tomm2/32/70887_2.png) [@TomM2](https://community.hubspot.com/u/TomM2)\
**Post date:** [June 9, 2023, 11:50am UTC](https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000/2 "2023-06-09T11:50:43Z")

</div>

Hey @MMcLellan It looks like you’re using field values for the urls. “even\_1.event\_1\_date” are pulling from these. Just to verify, do you have these fields set up on the right panel within the design manager?  
If so, do the snippets you’ve added in here exactly match the titles within the fields you’ve set?

If so, have you set a default value or a value for these fields? What is the output HTML you’re seeing from this module?

---

<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 9, 2023, 12:55pm UTC](https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000/3 "2023-06-09T12:55:13Z")

</div>

If you’re using the **URL** field then you would need to add .href to the end of the value to get the link.

`module.event_1.link_field.href`

If you’re using the **Link** field you would add .url.href to the end of the value to get the link.

`module.event_1.link_field.url.href`

You can click the “Copy” dropdown inside a field and select “Copy Snippet” to get the exact snippet needed to render the field data.

 ![copy-snippet.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/1/31f42e17fe63414c90482f2ffc7cf6debf92ed73.png)

---

<div class="post-metadata">

**Author:** ![MMcLellan](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@MMcLellan](https://community.hubspot.com/u/MMcLellan)\
**Post date:** [August 28, 2023, 6:25pm UTC](https://community.hubspot.com/t/module-for-email-table-with-href-not-working-with-link-or-url-fields/83000/4 "2023-08-28T18:25:58Z")

</div>

Thank you, this helped me figure out that snippet piece I was editing wrong!
