Embedded Marketo form doesn't display when I open the page in WP

Eve_Yu
Level 2

Embedded Marketo form doesn't display when I open the page in WP

I have an issue with the embedded Marketo form in WordPress.  The form doesn't show up when I open a page in WP, but when I refresh the page again, the form shows up. Does anyone know why this issue happens? 

Here is the error when I open a page and the form doesn't show up Error.png

8 REPLIES 8
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Embedded Makreto form doesn't display when I open the page in WP

If you share the page URL we can help you fix/ give more details. In general cannot read property of null error occurs when trying to call the JS method on a null value/object, or you’re probably trying to load the  form on the DOM element before it’s available. You need to ensure that the DOM element loads before you call the loadform method (when you refresh the page, the object/DOM element may have been loading faster probably due to page being cached).

 

Eve_Yu
Level 2

Re: Embedded Makreto form doesn't display when I open the page in WP

Thanks for your reply. I checked it again on our website, all things are good for now. I'm not sure what happened, but it seems that the issue is solved.  I'm not sure if it was affected by the Marketo release on May 6th. 

 

Here is a link with the Marketo form on our website:  https://www.comm100.com/company/about/contact/

 

 

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Embedded Makreto form doesn't display when I open the page in WP

You should be good as long as the forms2.0 library is loaded before you actually reference its functions, and by placing the script tag to load the forms2.0 form library before the MktoForms2.loadForm (or any other forms2.0 function) will ensure that the forms2.0 library is loaded before, unless of course if you set the defer attribute while loading the script. If you're referencing any other elements/functions in the forms, just make sure they're available/loaded before, as web browsers assume that the order of elements placed/defined in the DOM represents the chain of dependencies. 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Embedded Makreto form doesn't display when I open the page in WP

Simply put: we need a link to your page.

Eve_Yu
Level 2

Re: Embedded Makreto form doesn't display when I open the page in WP

Thanks for your reply. I checked it again on our website, all things are good for now. I'm not sure what happened, but it seems that the issue is solved.  I'm not sure if it was affected by the Marketo release on May 6th. 

 

Here is a link with the Marketo form on our website:  https://www.comm100.com/company/about/contact/

cshaffstall
Level 1

Re: Embedded Marketo form doesn't display when I open the page in WP

Content edited by moderator for accuracy.

We had the same issue with our website. Marketo told us they do not support forms in third-party websites. We have switched all of our forms to Paperform.

SanfordWhiteman
Level 10 - Community Moderator

Re: Embedded Marketo form doesn't display when I open the page in WP

This is absolutely untrue. The embed code is in fact designed for use on non-Marketo pages.

 

Jo_Pitts1
Level 10 - Community Advisor

Re: Embedded Marketo form doesn't display when I open the page in WP

@cshaffstall,

That seems somewhat odd given that most of the community is using their forms on 3rd party sites, and Marketo provides embed code to do just that.

 

If you are now using Paperform, how do you get all the data into Marketo?  How do you handle pre-fill?  different html for known visitors, How do you handle form fill events in Marketo etc etc.

 

Would it not be more prudent to actually solve the underlying issue?

 

@SanfordWhiteman - I see you and I were typing at the same time 🙂

 

Regards

Jo