CMS Development

newbie12
メンバー

Hubspot scripts file not found error

解決

Hi

Im trying to embed a hubspot form on a html file but it doesn't show up. A quick inspect showed the following errors:

Screenshot 2018-11-14 at 12.19.05 PM.png

I dont get why this happens.

Any help would be appreciated.

0 いいね!
1件の承認済みベストアンサー
valerajoey
解決策
参加者 | Platinum Partner
参加者 | Platinum Partner

Hubspot scripts file not found error

解決

try to use this instead 

//contact form
<div id="contact_us">
<div id="contact_form">
//hubspot form has to be displayed here
</div>
</div>
 
<!-- Hubspot Form -->
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>
<![endif]-->

<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>
<script>

hbspt.forms.create({ portalId: "573334", formId: "3b984c12-b049-46b7-8d1a-66376f2c379b", target: "#contact_form" }); </script>

 

 

元の投稿で解決策を見る

0 いいね!
5件の返信
valerajoey
参加者 | Platinum Partner
参加者 | Platinum Partner

Hubspot scripts file not found error

解決

can you provide us the link of the page your working on, 

0 いいね!
newbie12
メンバー

Hubspot scripts file not found error

解決

It is just a local file which isnt live yet. Could that be an issue?

I have attahed the section where the form has to be displayed and the hubspot form script below

 

//contact form
<div id="contact_us">
<div id="contact_form">
//hubspot form has to be displayed here
</div>
</div>
 
<!-- Hubspot Form -->
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script>
hbspt.forms.create({
portalId: "573334",
formId: "3b984c12-b049-46b7-8d1a-66376f2c379b",
target: "#contact_form"
});
</script>

 

 
The HubSpot form embed code is placed just before the body is closed
0 いいね!
valerajoey
解決策
参加者 | Platinum Partner
参加者 | Platinum Partner

Hubspot scripts file not found error

解決

try to use this instead 

//contact form
<div id="contact_us">
<div id="contact_form">
//hubspot form has to be displayed here
</div>
</div>
 
<!-- Hubspot Form -->
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>
<![endif]-->

<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>
<script>

hbspt.forms.create({ portalId: "573334", formId: "3b984c12-b049-46b7-8d1a-66376f2c379b", target: "#contact_form" }); </script>

 

 

0 いいね!
newbie12
メンバー

Hubspot scripts file not found error

解決

I had 

<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>

in the head section and not along with the rest of the embed code.

I moved it down and it worked!

 

Thanks a lot for the help!

0 いいね!
valerajoey
参加者 | Platinum Partner
参加者 | Platinum Partner

Hubspot scripts file not found error

解決

yes, that's the problem as seen in your first screenshot  the js src which supposed to be ref to HubSpot CDN was reference to your parent directory/root

0 いいね!