Embedded Form Javascript Code Not Appearing on Wix

Hey Wix Family!
I’m stuck and am curious if anyone knows a solution.

I am having trouble because for some reason, when I enter the Javascript code from Hubspot into the Wix code embed frame, the frame returns a blank white UX when I click “publish”.

How can we get this feature working ASAP to get our form live?

Thank You!

Joe

Hi @MagicYear

Quick search seems to indicate embedding HuBSpot JS on a WIX website isn’t as simple as dropping the embed code:

Wix generally does not support custom coding on hosted websites. As a result, it is not possible to embed your HubSpot form directly into a Wix page. To add a HubSpot form to your Wix page, try adding a Wix iframe module first, then adding the form to the module either as a Widget by entering the form’s embed code or an embedded Site by entering the URL of the form’s standalone page. - KB article link

Frank

Hey @MagicYear as Frank mentioned this is really down to how wix implement’s its “custom HTML”. They place it into an iframe (meaning an external page that’s embedded on the site) and they strip out any javascript (which is used to render the form).

There is a workaround, if you just add a special character (such as “.” without the quotes) before the HubSpot embed code this should allow the form to render. There’s a great post on this with suggestions here:

https://community.hubspot.com/t5/Reporting-Analytics/How-to-implement-Hubspot-on-a-Wix-site/m-p/289256/highlight/true#M1388

This worked for me!! Though now I have a . in the beginning of my form and wondering if you know how to get rid of it!

Thanks

Hey @CMarinaccio I’d probably do something like wrap it in a div and set it to display: none;
Something like:

<div style=“display:none”> . </div>

Although not sure if wix still strip this out!