jacovm
September 4, 2018, 1:40pm
1
I created this form:
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/shell.js ”></script>
<script>
hbspt.forms.create({
portalId: “1837750”,
formId: “40e957e2-0e67-4ec0-b903-c304fa532af6”
});
</script>
However, when trying to embed the form using HTML, it doesn’t seem to work and just shows a blank screen.
I tried using this website as well to test the code just in case, but it doesn’t work either.
The regular URL for this form does work however
Any ideas what’s wrong with the embed code? I just copy/pasted it? Anyone else experiencing this?
Thanks
Jacov
Hi @jacovm ,
The only thing that seems to be missing from this forms code is the IE 8 compatability script, which should look something like this:
<!--[if lte IE 8]>
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/shell-legacy.js ”></script>
<![endif]-->
The other possibility is that your website host is blocking the Javascript from functioning correctly, some hosts (including WordPress.com ) won’t allow Javascript to function.
If this doesn’t help, I’d suggest reaching out to your web host’s support group or HubSpot support for help.
Good Luck!
Trevor
jacovm
September 13, 2018, 12:18pm
3
Thanks @trevordjones
Yes, it did seem like an issue with the code on our website. Adding a <div> tag resolved this.
Thanks for the help.
Jacov
Interesting to here that <div> tags helped. You might look at the other code on the page to see if there is a place where a you are missing a </script> tag.
This solved it for me as well! To make forms work on Google Sites, just type
<div>
before the Hubspot embed code, and type
</div>
after the embed code. Boom, now it loads.
Thank you for sharing @tomshawver360md
This worked like a charm for using Hubspot forms in the new Google Sites, and it took me a while to get here, so thank you a lot!
ACD
February 3, 2020, 11:56am
8
Hi guys,
Sorry, I’m poor with coding. How exactly did you add the div code to the html to resolve this? I’m having an issue with the embeded code showing on my Google Sites.
Hi @jacovm ,
I had the same issue, after hours of debbuging I’ve found that the HTML code is missing the HTTPS:, that’s why It didn’t work for me.
The actual code is:
<script charset=“utf-8” type=“text/javascript” src=“https: //js.hsforms.net/forms/shell.js ”></script>
<script>
hbspt.forms.create({
portalId: “1837750”,
formId: “40e957e2-0e67-4ec0-b903-c304fa532af6”
});
</script>
Please tag this as a solution if It worked for You, I haven’t found this solution in any forum.
Greets.
I have de same problem it apears as a blank space, my actual code is:
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/shell.js ”></script>
<script>
hbspt.forms.create({
portalId: “7462782”,
formId: “e71c7040-572b-4e7b-ad10-6b2c12edb69c”
});
</script>
what do i have to put in order to make it work
Hi!
It seems to me that you have the same problem i did. Note that the src parameter is missing the protocol (HTTPS), that’s why the form wasn’t loading for me.
Try replacing your code with this:
<script charset=“utf-8” type=“text/javascript” src="https://js.hsforms.net/forms/shell.js"></script >
<script>
hbspt.forms.create({
portalId: “7462782”,
formId: “e71c7040-572b-4e7b-ad10-6b2c12edb69c”
});
</script>
thanks for the tip it still doesn’t work
Hi @fzubiran
Is the tracking code installed on the page, and are you recording page views for that page in HubSpot?