Lead Capture Tools

jacovm
Miembro

Embed code for Form doesn't work

resolver

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.

http://www.csgnetwork.com/htmlcodetest.html

 

The regular URL for this form does work however

https://share.hsforms.com/1QOlX4g5nTsC5A8ME-lMq9g13e0m

 

Any ideas what's wrong with the embed code? I just copy/pasted it? Anyone else experiencing this?

 

Thanks

 

Jacov

1 Soluciones aceptada
trevordjones
Solución
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Embed code for Form doesn't work

resolver

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

- Trevor
If my post solves your problem, please accept it as a solution.

Ver la solución en mensaje original publicado

0 Me gusta
12 Respuestas 12
fzubiran
Miembro

Embed code for Form doesn't work

resolver

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
0 Me gusta
julianalvarezk
Miembro

Embed code for Form doesn't work

resolver

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>
0 Me gusta
fzubiran
Miembro

Embed code for Form doesn't work

resolver

thanks for the tip it still doesn't work

0 Me gusta
trevordjones
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Embed code for Form doesn't work

resolver

Hi @fzubiran 

 

Is the tracking code installed on the page, and are you recording page views for that page in HubSpot?

 

 

- Trevor
If my post solves your problem, please accept it as a solution.

0 Me gusta
julianalvarezk
Miembro

Embed code for Form doesn't work

resolver

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.

trevordjones
Solución
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Embed code for Form doesn't work

resolver

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

- Trevor
If my post solves your problem, please accept it as a solution.

0 Me gusta
jacovm
Miembro

Embed code for Form doesn't work

resolver

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

icastrocr
Participante

Embed code for Form doesn't work

resolver
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!
0 Me gusta
ACD
Participante

Embed code for Form doesn't work

resolver

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. 

 

 

0 Me gusta
trevordjones
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Embed code for Form doesn't work

resolver

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.

- Trevor
If my post solves your problem, please accept it as a solution.

0 Me gusta
tomshawver360md
Participante

Embed code for Form doesn't work

resolver

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.

sharonlicari
Administrador de la comunidad
Administrador de la comunidad

Embed code for Form doesn't work

resolver

Thank you for sharing @tomshawver360md 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Me gusta