# Help with Link Fields in Custom Module

**URL:** <https://community.hubspot.com/t/help-with-link-fields-in-custom-module/17079>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [November 6, 2019, 6:00pm UTC](https://community.hubspot.com/t/help-with-link-fields-in-custom-module/17079 "2019-11-06T18:00:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenMIN](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/benmin/32/57633_2.png) [@BenMIN](https://community.hubspot.com/u/BenMIN)\
**Post date:** [November 6, 2019, 6:00pm UTC](https://community.hubspot.com/t/help-with-link-fields-in-custom-module/17079/1 "2019-11-06T18:00:27Z")

</div>

Hi,  
I’m trying to add a link field to a custom module like this: [URL and Link fields now available in Custom Modules](https://designers.hubspot.com/blog/url-and-link-fields-now-available-in-custom-modules)  
When I do this and click the “read more” link it just takes me back to the same page the module is on.  
I have made a link field HubL variable called “link\_field”

```auto
<div class="uilink" {{module.link_field.href}} >
{% set href = module.link_field.url.href %}
{% if module.link_field.url.type is equalto "EMAIL_ADDRESS" %}
{% set href = "mailto:" + href %}
{% endif %}
<a href="{{ href }}"
{% if module.link_field.open_in_new_tab %}target="_blank"{% endif %}
{% if module.link_field.no_follow %}rel="nofollow"{% endif %}>
Read more</a>
</div>

```

Not sure what I’m doing wrong here?  
Thanks!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [November 7, 2019, 4:43am UTC](https://community.hubspot.com/t/help-with-link-fields-in-custom-module/17079/2 "2019-11-07T04:43:43Z")

</div>

Hi @BenMIN,

Are you linking to an external site? If so, did you indicate the correct external link?

On my end, I set up a custom module to add link field like this:

 ![Screen Shot 2019-11-07 at 12.41.43 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/2/629e49e37d4b23ced258c4304fc80d2352dd9f80.jpeg)

Add the module on my page: [https://info.wendyggx.com/landing-page/fuji-yoga](https://info.wendyggx.com/landing-page/fuji-yoga) \> When I click on the ‘Read More’ link \> I was directed to [google.com](http://google.com) just fine.

Do our set up match? Let me know if I’m missing anything here.

---

<div class="post-metadata">

**Author:** ![BenMIN](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/benmin/32/57633_2.png) [@BenMIN](https://community.hubspot.com/u/BenMIN)\
**Post date:** [November 7, 2019, 9:33am UTC](https://community.hubspot.com/t/help-with-link-fields-in-custom-module/17079/3 "2019-11-07T09:33:06Z")

</div>

Hi Wendy,

Thanks for your help! I realised I had a typo in the field. I’ve got it working now.

Thanks!
