Hello,
I am using Wordpress for my website and when I input the embeded code from Hubspot, the form does not appear on the page, it is just blank.
Looking at the chrome developer tools I notice that a piece of code has been added that says, "defer data-deferred=“1"”. Doing some research online, I found that certain plugins used to optimize your site could add this code. I was able to find a setting for JS Deferred in LightSeed Cache and once I turned it off the form appears as expected. However I would like to optimize my site with this program.
So reaching out to lightSpeed Cache they suggested using the following code
<div id=“formHolder”>
<!--[if lte IE 8]>
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/v2-legacy.js” defer></script>
<![endif]-->
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/v2.js” defer=“”></script>
<script>
window.onload = function() {
hbspt.forms.create({
portalId: “Number”,
formId: “Number”,
css: “”,
target: “#formHolder”
});
}
</script>
</div>
Note I have taken out the portalid and formid numbers.
However when I add this code and run it, the background of the form fails to appear until I resize the window.
How the page loads initialy is the first image and how the form loads after resizing the window is the second image.
Any ideas on how to resolve this issue? I have also tried different browsers and same result.
thanks for your help!
