I had 2 Hubspot forms on my website and they were working just fine for a few days. Yesterday they disappear from the site and it has caused trouble for people wanting to contact us. I've checked the form settings and there's nothing weird about them. What are the reasons and how could I fix it?
Check if your website is showing any javascript errors (in the browser console), such errors can sometimes block Hubspot forms from loading properly.
Look at your page source code (CTRL+U and search, CTRL+F, for <form ) and check if you can the form code in your page's code. This might help you figure out if the form is being hidden with CSS or something similar.
If you can share a URL of a page with this issue I can take a look and see if I can see what the problem is.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Thanks. Yes, I don't see the code appearing on the page, so I'm wondering if Avia Layout Architect is stripping it out. Are you placing the embed code in a text block element or code block within the layout editor? I found this article that discusses using a code block for embed codes in the Avia Layout builder (this video might help too). If it isn't already try placing the embed code in a code block in your page.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Hi @MCuzmaCépeda That is strange. That code is definitely not being output to the page
It looks like this could be an issue with the layout editor/theme. It's probably worth reaching out to the theme developers to see if they can help troubleshoot this.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Check if your website is showing any javascript errors (in the browser console), such errors can sometimes block Hubspot forms from loading properly.
Look at your page source code (CTRL+U and search, CTRL+F, for <form ) and check if you can the form code in your page's code. This might help you figure out if the form is being hidden with CSS or something similar.
If you can share a URL of a page with this issue I can take a look and see if I can see what the problem is.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
I took a quick look and didn't see any obvious issues that would cause this. I see the form script on your page but that isn't rendering a form. A few questions and suggestions:
How are you embedding the form in WordPress i.e. using a shortcode or the full embed code?
If you are using the HubSpot Worpdress plugin to embed the form have you tried just using the full embed code?
I see you are using a caching plugin, maybe WP Optimize, can you try purging the plugin's cache?
I see you are using a Cookie control plugin. Have any changes been made in your Cookie control settings?
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
How are you embedding the form in WordPress i.e. using a shortcode or thefull embed code?- the full embed code ... but after the form dissapeared we also tried the shortcode and changed it back to the full embeded code.
If you are using the HubSpot Worpdress plugin to embed the form have you tried just using the full embed code? - yes we are using the HubSpot WP Plugin and did so. The form worked for many weeks/months and suddenly it dissapeared without any changes.
I see you are using a caching plugin, maybe WP Optimize, can you try purging theplugin's cache? - we have already done it but unfortunately without success.
I see you are using a Cookie control plugin. Have any changes been made in your Cookie control settings? - we didn´t change the cookie control.
Also: Everything is updated ... WP, Licence, Plugins
Hi @MCuzmaCépeda I'm seeing differences between the form creation code inserted into your site via the HubSpot WordPress plugin compared to a fresh install I did on a test site. Here's what my test code looks like:
<!-- DO NOT COPY THIS SNIPPET! Start of Page Analytics Tracking for HubSpot WordPress plugin v8.0.227-->
<script type="text/javascript">
var _hsq = _hsq || [];
_hsq.push(["setContentType", "standard-page"]);
</script>
<!-- DO NOT COPY THIS SNIPPET! End of Page Analytics Tracking for HubSpot WordPress plugin -->
<script>
(function() {
var hbspt = window.hbspt = window.hbspt || {};
hbspt.forms = hbspt.forms || {};
hbspt._wpFormsQueue = [];
hbspt.enqueueForm = function(formDef) {
if (hbspt.forms && hbspt.forms.create) {
hbspt.forms.create(formDef);
} else {
hbspt._wpFormsQueue.push(formDef);
}
}
if (!window.hbspt.forms.create) {
Object.defineProperty(window.hbspt.forms, 'create', {
configurable: true,
get: function() {
return hbspt._wpCreateForm;
},
set: function(value) {
hbspt._wpCreateForm = value;
while (hbspt._wpFormsQueue.length) {
var formDef = hbspt._wpFormsQueue.shift();
if (!document.currentScript) {
var formScriptId = 'leadin-forms-v2-js';
hubspot.utils.currentScript = document.getElementById(formScriptId);
}
hbspt._wpCreateForm.call(hbspt.forms, formDef);
}
},
});
}
})();
</script>
Running through the code I see some pieces of the code missing. If you have recently updated your HubSpot plugin, my next guess is that the WP-Optimize plugin is altering your code. If you can, I would suggest disabling HTML / Javascript minification and/or disabling the plugin to see if that is causing the issue (on a test site if possible). Also, on https://monikacuzmacepeda.com/netzwerktreffen, I don't see the actual form embed code which would look something like this:
If you have embedded that code in this page then something must be stripping that out also. Again WP-Optimize could be the culprit, but if not, I would suggest checking for conflicting plugins. Recent updates to other plugins can sometimes cause conflicts and unexpected behaviour.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Hi, we are having the exact same issue site-wide right now. All of our contact forms show up then they disappear immediately. One example with our Contact Us page - https://www.robomq.io/about-us/#contact
I have followed all of these steps here you have shared, but these don't seem to be the issue.
Your Hubspot contact form is displaying and stays on the page for me. I did notice that you have a few javascript errors, including what looks like an unpublished Google Tag Manager container and two copies of your Google Tag Manager script on one page.
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Thank you, I see it is working now. Our team worked behind the scenes on it and did mention that some of the HubSpot Form Iframe CSS property was not working for Chrome browser so they were able to add it manually.
Would you please be able to share how you managed to get the hubspot form to stay in place? We are also having the form disappear to the left after the page loads.