# Embed code or create code block to display external content on a Hubspot web page

**URL:** <https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [May 31, 2023, 12:19pm UTC](https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346 "2023-05-31T12:19:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chappers](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@Chappers](https://community.hubspot.com/u/Chappers)\
**Post date:** [May 31, 2023, 12:19pm UTC](https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346/1 "2023-05-31T12:19:54Z")

</div>

I have some code that should display a widget form. When I try to embed it or create a module to test this form displaying, it doesn’t show anything when previewing the Hubspot CMS page I’ve added the code to. I’m wondering if I have to do something else e.g. like this info here about require.js \> [How to Use Web Components in HubSpot CMS Templates and Modules](https://developers.hubspot.com/blog/use-web-components-in-hubspot-cms-development)

The code I am trying to test is:

\<div id=“homewise-calculator”\>\</div\>  
\<script\>  
window.renderHomewiseCalculator({  
targetSelector: ‘#homewise-calculator’,  
type: ’ budget-booster-listing’,  
});  
\</script\>

It also uses a URL reference which i understood should be in header:

\<script src=“[https://homewise.dabdev.net/js/homewise-calculator-widget.js](https://homewise.dabdev.net/js/homewise-calculator-widget.js)”\>\</script\>

---

<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:** [May 31, 2023, 2:06pm UTC](https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346/2 "2023-05-31T14:06:07Z")

</div>

Hey @Chappers if you’re just trying to add some custom code onto your site you could just use the “[source code](https://knowledge.hubspot.com/website-pages/edit-content-in-a-rich-text-module#:~:text=To%20access%20the%20source%20code,complex%20HTML%20to%20your%20page.)” button within a rich text module.  
Alternatively if you plan on reusing it, it might be beneficial to just create a custom module within the design manager and copy your code in here: [Create and edit modules in the design manager](https://knowledge.hubspot.com/design-manager/create-and-edit-modules)  
I just tested this out however and it looks like there’s actually an issue with the code itself that’s causing it not to appear on the page:

 ![TomM2_0-1685541960390.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/9/95d3973207e1ebae52cfdbe471834679789095a6.png)

---

<div class="post-metadata">

**Author:** ![Chappers](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@Chappers](https://community.hubspot.com/u/Chappers)\
**Post date:** [June 4, 2023, 12:33pm UTC](https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346/3 "2023-06-04T12:33:50Z")

</div>

Thanks @TomM2 - This coming week we’re speaking with the company that supplied that code (the firm is non-Hubspot). Hopefully I can orientate them in the HS CMS. I’ve got some pointers to give them and the knowledge base info you flagged. Let’s see how we get on …

---

<div class="post-metadata">

**Author:** ![Chappers](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@Chappers](https://community.hubspot.com/u/Chappers)\
**Post date:** [June 6, 2023, 2:37pm UTC](https://community.hubspot.com/t/embed-code-or-create-code-block-to-display-external-content-on-a-hubspot-web-page/82346/4 "2023-06-06T14:37:19Z")

</div>

Solved this with supplier dev. Turns out an additional space had crept into the code before the ‘b’ in budget-booster-listing 😱 🤣
