We're trying to prevent the use of free email domains in the email field. You have some code for that here...
We are receiving an error with that code...
Uncaught ReferenceError: MktoForms2 is not defined
I completed a search and I see that others have had trouble with the code provided by Marketo (see bottom of page here)...
Is the code referenced above still good to use? Is there another method? Please advise.
Thanks Sanford. But I don't see that the demo is working as expected. I've tried a hotmail.com domain and my own business domain (juusui.com). I didn't receive any action for either (no form submit nor a validation warning).
The demo uses the freemail-disposable list, as noted. You can use the full freemail list if desired. Both are downloadable from the link(s) in the thread: freemail/data at master · GitHub
Like many others here, I'm not a fan of banning fully operational email addresses simply because they happen to be at a major free/freemium email provider. There are very good reasons for business users to use non-business addresses for initial inquiries. At any rate, the code is completely agnostic as to what list of domains you want to ban. Just upload a list of your choosing.
I didn't receive any action for either (no form submit nor a validation warning).
Obviously the demo form has actual submission disabled as it is linked to a live Marketo instance. But the validation warning is shown when you enter a banned domain.