SOLVED

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

Go to solution
Albert_Albala
Level 1

New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

I have put the embed code on a page:

https://hatch130.github.io/marketo-sandbox/

The page contains only this source code:

<html>

<body>

<h1>Marketo form test</h1>

<script src="//app-sj04.marketo.com/js/forms2/js/forms2.min.js"></script> <script>MktoForms2.loadForm("//app-sj04.marketo.com", "541-JCA-443", 539);</script>

</body>

</html>

I am expecting to see a form, but I'm seeing a blank page with no error. Any guidance much appreciated, thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

Also, you don't have the <form>!

Fix that, fix the overall page, it'll work.

Though you should also read this: Make your form embeds happier and more productive by loading from your LP domain (not //app-somethin...

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

That's not a valid HTML page. HTML must also have a non-empty <title> and a DOCTYPE at minimum.

Also, please always highlight code when pasting it into a Community post:

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter.gif

SanfordWhiteman
Level 10 - Community Moderator

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

Also, you don't have the <form>!

Fix that, fix the overall page, it'll work.

Though you should also read this: Make your form embeds happier and more productive by loading from your LP domain (not //app-somethin...

Albert_Albala
Level 1

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

Thanks Sanford, I was missing the form tag! This works (it's not valid HTML as you mentioned, but it works anyway):

<html>

<body>

<h1>Marketo form test</h1>

<form id="mktoForm_539"></form>

<script src="//app-sj04.marketo.com/js/forms2/js/forms2.min.js"></script> <script>MktoForms2.loadForm("//app-sj04.marketo.com", "541-JCA-443", 539);</script>

</body>

</html>

This is solved!

SanfordWhiteman
Level 10 - Community Moderator

Re: New to Marketo, I am expecting to see a form on this page, but it's blank with no errors.

You need a standard DOCTYPE and valid <head>, though, or the page will break on some browsers. Can't rely on markup being added implicitly.