SOLVED

Custom Form Not Loading Unless Cookied

Go to solution
Highlighted

Custom Form Not Loading Unless Cookied

We just launched a new email preference center, but we are running into an issue where the form does not load on the page unless the lead hitting it is cookied. Wondering if anyone else has had this problem or has any recommendations on how to fix. You can check it out here: www1.articulate.com/email-preferences.html

Thanks in advance for any help!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Custom Form Not Loading Unless Cookied

What Kenny said, but it's even worse because you have a dependency on $ (the core jQuery object) in code within a Marketo Forms RTA that might run before jQuery is loaded.

This is a picture-perfect race condition and your developer needs to rethink the implementation.

A classic mistake is thinking that two asynchronus processes will still complete in the order in which they were invoked, when the definition of async is that they may complete in either order.

View solution in original post

4 REPLIES 4
Marketo Employee

Re: Custom Form Not Loading Unless Cookied

There appears to be some custom script embedded which is failing when mktoPrefillFields is undefined, as when someone visits a landing page as an unknown lead.  The variable isn't being checked to see if it exists which is throwing an exception and appears to be breaking your form.  I'd either remove this code or have your developer update it to check properly.

Highlighted

Re: Custom Form Not Loading Unless Cookied

Thanks, Kenny! That is helpful. I'll let the dev know, and I may be back with more questions.

Highlighted
Level 10 - Community Moderator

Re: Custom Form Not Loading Unless Cookied

What Kenny said, but it's even worse because you have a dependency on $ (the core jQuery object) in code within a Marketo Forms RTA that might run before jQuery is loaded.

This is a picture-perfect race condition and your developer needs to rethink the implementation.

A classic mistake is thinking that two asynchronus processes will still complete in the order in which they were invoked, when the definition of async is that they may complete in either order.

View solution in original post

Highlighted

Re: Custom Form Not Loading Unless Cookied

Thank you! I'll pass this along to the dev and hope we can come up with a solution.