Re: Restrict certain domains in email field

Anonymous
Not applicable

Restrict certain domains in email field

We're trying to prevent the use of free email domains in the email field. You have some code for that here...

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

We are receiving an error with that code...

Uncaught ReferenceError: MktoForms2 is not defined

    at platform9.com/:471

    at platform9.com/:496

I completed a search and I see that others have had trouble with the code provided by Marketo (see bottom of page here)...

Restrict free email domains on form fill out

Is the code referenced above still good to use? Is there another method? Please advise.

Thank you

Shannon Dunn

Tags (2)
4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Restrict certain domains in email field

See my comments here and demo (also linked from that thread) here.

Anonymous
Not applicable

Re: Restrict certain domains in email field

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).

SanfordWhiteman
Level 10 - Community Moderator

Re: Restrict certain domains in email field

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.

SanfordWhiteman
Level 10 - Community Moderator

Re: Restrict certain domains in email field

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.