Preventing gmail, hotmail etc on spark edition

Anonymous
Not applicable

Hello,

I included this script in my template in order to prevent users from entering non-business addresses

http://developers.marketo.com/blog/restrict-free-email-domains-on-form-fill-out/

However it doesnt seem to work. The MktoForms2 element seems to be unavailable

Might this have to do with the fact that I have the spark edition?

Edit: Never mind, solved. Apparently you cannot place this script in the <head> tag, it needs to be at the bottom of the <body> tag

1 REPLY 1
Grégoire_Miche2
Level 10

Hi Erik,

The script have to be placed at the bottom of the page as it can only run once the form has be rendered.

In a Marketo LP, it has to be placed into a MktoForms2.whenReady

-Greg